src/Filesystem.php
public function dir($path, $createMissing = false)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        if (! $createMissing && ! $this->isDir($path, true)) {
            throw new FilesystemException("Cannot find the directory '{$path}'");
        }
        return new Directory($path, $this->adapter);
    }
public function dir($path, $createMissing = false)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        if (! $createMissing && ! $this->isDir($path, true)) {
            throw new FilesystemException("Cannot find the directory '{$path}'");
        }
        return new Directory($path, $this->adapter);
    }
public function dir ( $ path , $ createMissing = false ) { if ( ! $ this -> adapter -> isAbsolute ( $ path ) ) { $ path = $ this -> rootPath . $ path ; } if ( ! $ createMissing && ! $ this -> isDir ( $ path , true ) ) { throw new FilesystemException ( "Cannot find the directory '{$path}'" ) ; } return new Directory ( $ path , $ this -> adapter ) ; }
Gets a directory by relative or absolute path,
optionally creates the directory if missing.

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

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