src/Filesystem.php
public function file($path, $createMissing = false)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        if (! $createMissing && ! $this->isFile($path, true)) {
            throw new FilesystemException("Cannot find the file '{$path}'");
        }

        return new File($path, $this->adapter);
    }
public function file($path, $createMissing = false)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        if (! $createMissing && ! $this->isFile($path, true)) {
            throw new FilesystemException("Cannot find the file '{$path}'");
        }

        return new File($path, $this->adapter);
    }
public function file ( $ path , $ createMissing = false ) { if ( ! $ this -> adapter -> isAbsolute ( $ path ) ) { $ path = $ this -> rootPath . $ path ; } if ( ! $ createMissing && ! $ this -> isFile ( $ path , true ) ) { throw new FilesystemException ( "Cannot find the file '{$path}'" ) ; } return new File ( $ path , $ this -> adapter ) ; }
Gets a file by relative or absolute path,
optionally creates the file if missing.

@param  string  $path
@param  boolean $createMissing
@return Tarsana\Filesystem\File

@throws Tarsana\Filesystem\Exceptions\FilesystemException
Gets a file by relative or absolute path optionally creates the file if missing .