public function createFile($name = null)
    {
        if (null === $name) {
            if (false === ($file = tempnam(sys_get_temp_dir(), 'tst'))) {
                throw FileSystemException::lastError($name);
            }

            $this->purgePaths[] = $file;
        } else {
            if (false === touch(
                $file = $this->createDir() . DIRECTORY_SEPARATOR . $name
            )){
                throw FileSystemException::lastError($file);
            }
        }

        return $file;
    }
public function createFile($name = null)
    {
        if (null === $name) {
            if (false === ($file = tempnam(sys_get_temp_dir(), 'tst'))) {
                throw FileSystemException::lastError($name);
            }

            $this->purgePaths[] = $file;
        } else {
            if (false === touch(
                $file = $this->createDir() . DIRECTORY_SEPARATOR . $name
            )){
                throw FileSystemException::lastError($file);
            }
        }

        return $file;
    }
public function createFile ( $ name = null ) { if ( null === $ name ) { if ( false === ( $ file = tempnam ( sys_get_temp_dir ( ) , 'tst' ) ) ) { throw FileSystemException :: lastError ( $ name ) ; } $ this -> purgePaths [ ] = $ file ; } else { if ( false === touch ( $ file = $ this -> createDir ( ) . DIRECTORY_SEPARATOR . $ name ) ) { throw FileSystemException :: lastError ( $ file ) ; } } return $ file ; }
Creates a temporary file path that will be automatically purged at the
end of the test.

@param string $name The file name.

@return string The file path.

@throws FileSystemException If the file could not be created.
Creates a temporary file path that will be automatically purged at the end of the test .