Attachment/AttachmentHandler.php
protected function checkFile(File $file, $deleteAfterCopy)
    {
        if (!$file->isReadable())
        {
            throw new InputFileNotReadableException('File ' . $file->getRealPath() . ' is not readable');
        }
        
        if ($deleteAfterCopy && !$file->isWritable())
        {
            throw new InputFileNotWritableException('File ' . $file->getRealPath() . ' is not writable');
        }
        
        return true;
    }
protected function checkFile(File $file, $deleteAfterCopy)
    {
        if (!$file->isReadable())
        {
            throw new InputFileNotReadableException('File ' . $file->getRealPath() . ' is not readable');
        }
        
        if ($deleteAfterCopy && !$file->isWritable())
        {
            throw new InputFileNotWritableException('File ' . $file->getRealPath() . ' is not writable');
        }
        
        return true;
    }
protected function checkFile ( File $ file , $ deleteAfterCopy ) { if ( ! $ file -> isReadable ( ) ) { throw new InputFileNotReadableException ( 'File ' . $ file -> getRealPath ( ) . ' is not readable' ) ; } if ( $ deleteAfterCopy && ! $ file -> isWritable ( ) ) { throw new InputFileNotWritableException ( 'File ' . $ file -> getRealPath ( ) . ' is not writable' ) ; } return true ; }
Perform some checks to see if the given file is valid and ready to use.

@throws InputFileNotReadableException
@throws InputFileNotWritableException

@param File $file
@param boolean $deleteAfterCopy

@return boolean
Perform some checks to see if the given file is valid and ready to use .