src/Filesystem.php
protected function is($path, $type)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        switch ($type) {
            case 'readable':
                return $this->adapter->isReadable($path);
            case 'writable':
                return $this->adapter->isWritable($path);
            case 'executable':
                return $this->adapter->isExecutable($path);
            case 'file':
                return $this->adapter->isFile($path);
            case 'dir':
                return $this->adapter->isDir($path);
            case 'any':
                return $this->adapter->fileExists($path);
            default:
                throw new FilesystemException("Unknown file type '{$type}'");
        }
    }
protected function is($path, $type)
    {
        if (! $this->adapter->isAbsolute($path)) {
            $path = $this->rootPath . $path;
        }
        switch ($type) {
            case 'readable':
                return $this->adapter->isReadable($path);
            case 'writable':
                return $this->adapter->isWritable($path);
            case 'executable':
                return $this->adapter->isExecutable($path);
            case 'file':
                return $this->adapter->isFile($path);
            case 'dir':
                return $this->adapter->isDir($path);
            case 'any':
                return $this->adapter->fileExists($path);
            default:
                throw new FilesystemException("Unknown file type '{$type}'");
        }
    }
protected function is ( $ path , $ type ) { if ( ! $ this -> adapter -> isAbsolute ( $ path ) ) { $ path = $ this -> rootPath . $ path ; } switch ( $ type ) { case 'readable' : return $ this -> adapter -> isReadable ( $ path ) ; case 'writable' : return $ this -> adapter -> isWritable ( $ path ) ; case 'executable' : return $ this -> adapter -> isExecutable ( $ path ) ; case 'file' : return $ this -> adapter -> isFile ( $ path ) ; case 'dir' : return $ this -> adapter -> isDir ( $ path ) ; case 'any' : return $ this -> adapter -> fileExists ( $ path ) ; default : throw new FilesystemException ( "Unknown file type '{$type}'" ) ; } }
Checks if the given path is of the given type.

@param  string  $path
@param  string  $type
@return boolean
Checks if the given path is of the given type .