PHP Class Kraken\Filesystem\FilesystemManager

Inheritance: implements Kraken\Filesystem\FilesystemManagerInterface
显示文件 Open project: kraken-php/framework Class Usage Examples

Protected Properties

Property Type Description
$filesystems Kraken\Filesystem\FilesystemInterface[]

Public Methods

Method Description
__construct ( Kraken\Filesystem\FilesystemInterface[] $filesystems = [] )
__destruct ( )
append ( $path, $contents )
copyDir ( $source, $destination )
copyFile ( $source, $destination )
create ( $path, $contents )
createDir ( $dirname, $visibility = Filesystem::VISIBILITY_DEFAULT )
createFile ( $path, $contents = '', $visibility = Filesystem::VISIBILITY_DEFAULT )
eraseDir ( $dirname = '' )
eraseFile ( $path )
exists ( $path )
existsFilesystem ( $prefix )
getContents ( $directory = '', $recursive = false, $filterPatterns = [] )
getDirectories ( $directory = '', $recursive = false, $filterPatterns = [] )
getFiles ( $directory = '', $recursive = false, $filterPatterns = [] )
getFilesystem ( $prefix )
getMimetype ( $path )
getSize ( $path )
getTimestamp ( $path )
getType ( $path )
getVisibility ( $path )
isDir ( $path )
isFile ( $path )
isPrivate ( $path = '' )
isPublic ( $path = '' )
mountFilesystem ( $prefix, Kraken\Filesystem\FilesystemInterface $filesystem )
mountFilesystems ( $filesystems )
move ( $source, $destination )
prepend ( $path, $contents )
read ( $path )
removeDir ( $dirname )
removeFile ( $path )
req ( $path )
setPrivate ( $path = '' )
setPublic ( $path = '' )
setVisibility ( $path, $visibility )
unmountFilesystem ( $prefix )
write ( $path, $contents )

Private Methods

Method Description
filterPrefix ( string $path ) : string[] Filter $path in search for $prefix, if its present explode $path into $prefix and $newPath.

Method Details

__construct() public method

public __construct ( Kraken\Filesystem\FilesystemInterface[] $filesystems = [] )
$filesystems Kraken\Filesystem\FilesystemInterface[]

__destruct() public method

public __destruct ( )

append() public method

public append ( $path, $contents )

copyDir() public method

public copyDir ( $source, $destination )

copyFile() public method

public copyFile ( $source, $destination )

create() public method

public create ( $path, $contents )

createDir() public method

public createDir ( $dirname, $visibility = Filesystem::VISIBILITY_DEFAULT )

createFile() public method

public createFile ( $path, $contents = '', $visibility = Filesystem::VISIBILITY_DEFAULT )

eraseDir() public method

public eraseDir ( $dirname = '' )

eraseFile() public method

public eraseFile ( $path )

exists() public method

public exists ( $path )

existsFilesystem() public method

public existsFilesystem ( $prefix )

getContents() public method

public getContents ( $directory = '', $recursive = false, $filterPatterns = [] )

getDirectories() public method

public getDirectories ( $directory = '', $recursive = false, $filterPatterns = [] )

getFiles() public method

public getFiles ( $directory = '', $recursive = false, $filterPatterns = [] )

getFilesystem() public method

public getFilesystem ( $prefix )

getMimetype() public method

public getMimetype ( $path )

getSize() public method

public getSize ( $path )

getTimestamp() public method

public getTimestamp ( $path )

getType() public method

public getType ( $path )

getVisibility() public method

public getVisibility ( $path )

isDir() public method

public isDir ( $path )

isFile() public method

public isFile ( $path )

isPrivate() public method

public isPrivate ( $path = '' )

isPublic() public method

public isPublic ( $path = '' )

mountFilesystem() public method

public mountFilesystem ( $prefix, Kraken\Filesystem\FilesystemInterface $filesystem )
$filesystem Kraken\Filesystem\FilesystemInterface

mountFilesystems() public method

public mountFilesystems ( $filesystems )

move() public method

public move ( $source, $destination )

prepend() public method

public prepend ( $path, $contents )

read() public method

public read ( $path )

removeDir() public method

public removeDir ( $dirname )

removeFile() public method

public removeFile ( $path )

req() public method

public req ( $path )

setPrivate() public method

public setPrivate ( $path = '' )

setPublic() public method

public setPublic ( $path = '' )

setVisibility() public method

public setVisibility ( $path, $visibility )

unmountFilesystem() public method

public unmountFilesystem ( $prefix )

write() public method

public write ( $path, $contents )

Property Details

$filesystems protected_oe property

protected FilesystemInterface[],Kraken\Filesystem $filesystems
return Kraken\Filesystem\FilesystemInterface[]