public function createFile(string $fileName): \SplFileInfo
    {
        $fileInfo = new \SplFileInfo($this->getTmpFolder() . '/' . $fileName);
        $pathName = $fileInfo->getPathname();
        if (!file_exists(dirname($pathName))) {
            $this->fileSystem->mkdir(dirname($pathName), self::FILE_MODE);
        }
        $this->fileSystem->touch($pathName);
        $this->fileSystem->chmod($pathName, self::FILE_MODE);
        return $fileInfo;
    }
public function createFile(string $fileName): \SplFileInfo
    {
        $fileInfo = new \SplFileInfo($this->getTmpFolder() . '/' . $fileName);
        $pathName = $fileInfo->getPathname();
        if (!file_exists(dirname($pathName))) {
            $this->fileSystem->mkdir(dirname($pathName), self::FILE_MODE);
        }
        $this->fileSystem->touch($pathName);
        $this->fileSystem->chmod($pathName, self::FILE_MODE);
        return $fileInfo;
    }
public function createFile ( string $ fileName ) : \ SplFileInfo { $ fileInfo = new \ SplFileInfo ( $ this -> getTmpFolder ( ) . '/' . $ fileName ) ; $ pathName = $ fileInfo -> getPathname ( ) ; if ( ! file_exists ( dirname ( $ pathName ) ) ) { $ this -> fileSystem -> mkdir ( dirname ( $ pathName ) , self :: FILE_MODE ) ; } $ this -> fileSystem -> touch ( $ pathName ) ; $ this -> fileSystem -> chmod ( $ pathName , self :: FILE_MODE ) ; return $ fileInfo ; }
Creates a named temporary file.

@param string $fileName
@return \SplFileInfo
@throws \Exception
Creates a named temporary file .