private function checkFileBeforeInitialize($directory, $file)
    {
        $filePath = $directory . '/' . $file;

        if (file_exists($filePath)) {
            throw new IOException(sprintf(
                'The file "%s" already exist.',
                $filePath
            ));
        }

        touch($filePath);
    }
private function checkFileBeforeInitialize($directory, $file)
    {
        $filePath = $directory . '/' . $file;

        if (file_exists($filePath)) {
            throw new IOException(sprintf(
                'The file "%s" already exist.',
                $filePath
            ));
        }

        touch($filePath);
    }
private function checkFileBeforeInitialize ( $ directory , $ file ) { $ filePath = $ directory . '/' . $ file ; if ( file_exists ( $ filePath ) ) { throw new IOException ( sprintf ( 'The file "%s" already exist.' , $ filePath ) ) ; } touch ( $ filePath ) ; }
Check the file before initialize

@param string $directory
@param string $file

@throws IOException
Check the file before initialize