PHP 인터페이스 Kraken\Filesystem\FilesystemInterface

파일 보기 프로젝트 열기: kraken-php/framework 0 사용 예제들

공개 메소드들

메소드 설명
append ( string $path, string $contents ) Appends contents to file.
copyDir ( string $source, string $destination ) Copy a directory.
copyFile ( string $source, string $destination ) Copy a file.
create ( string $path, string $contents ) Create a new file or overwrite existing one.
createDir ( string $dirname, string $visibility = Filesystem::VISIBILITY_DEFAULT ) Create a directory.
createFile ( string $path, string $contents = '', string $visibility = Filesystem::VISIBILITY_DEFAULT ) Create a new file.
eraseDir ( string $dirname = '' ) Erase a directory.
eraseFile ( string $path ) Erase a file.
exists ( string $path ) : boolean Check whether a file or directory exist.
getContents ( string $directory = '', boolean $recursive = false, string | string[] $filterPatterns = [] ) : array List contents of a directory.
getDirectories ( string $directory = '', boolean $recursive = false, string | string[] $filterPatterns = [] ) : array List directories of a directory.
getFiles ( string $directory = '', boolean $recursive = false, string | string[] $filterPatterns = [] ) : array List files of a directory.
getMimetype ( string $path ) : string Get mimetype of a file.
getSize ( $path ) : integer Returns size of a file.
getTimestamp ( string $path ) : string Get timestamp of a file.
getType ( string $path ) : string Get type of a file.
getVisibility ( string $path ) : string Get visibility of a file or directory.
isDir ( string $path ) : boolean Check if path is a file.
isFile ( string $path ) : boolean Check if path is a file.
isPrivate ( string $path = '' ) : boolean Check if file or directory is private.
isPublic ( string $path = '' ) : boolean Check if file or directory is public.
move ( string $source, string $destination ) Move (rename) a file or directory.
prepend ( string $path, string $contents ) Prepends contents to file.
read ( string $path ) : string Read a file.
removeDir ( string $dirname ) Remove a directory.
removeFile ( string $path ) Remove a file.
req ( string $path ) : mixed Require a file.
setPrivate ( string $path = '' ) Sets visibility of file or directory to private.
setPublic ( string $path = '' ) Sets visibility of file or directory to public.
setVisibility ( string $path, string $visibility ) Set visibility of a file or directory.
write ( string $path, string $contents ) Overwrite existing file.

메소드 상세

append() 공개 메소드

Appends contents to file.
public append ( string $path, string $contents )
$path string
$contents string

copyDir() 공개 메소드

Copy a directory.
public copyDir ( string $source, string $destination )
$source string
$destination string

copyFile() 공개 메소드

Copy a file.
public copyFile ( string $source, string $destination )
$source string
$destination string

create() 공개 메소드

Create a new file or overwrite existing one.
public create ( string $path, string $contents )
$path string
$contents string

createDir() 공개 메소드

Create a directory.
public createDir ( string $dirname, string $visibility = Filesystem::VISIBILITY_DEFAULT )
$dirname string
$visibility string

createFile() 공개 메소드

Create a new file.
public createFile ( string $path, string $contents = '', string $visibility = Filesystem::VISIBILITY_DEFAULT )
$path string
$contents string
$visibility string

eraseDir() 공개 메소드

Erase a directory.
public eraseDir ( string $dirname = '' )
$dirname string

eraseFile() 공개 메소드

Erase a file.
public eraseFile ( string $path )
$path string

exists() 공개 메소드

Check whether a file or directory exist.
public exists ( string $path ) : boolean
$path string
리턴 boolean

getContents() 공개 메소드

List contents of a directory.
public getContents ( string $directory = '', boolean $recursive = false, string | string[] $filterPatterns = [] ) : array
$directory string
$recursive boolean
$filterPatterns string | string[]
리턴 array

getDirectories() 공개 메소드

List directories of a directory.
public getDirectories ( string $directory = '', boolean $recursive = false, string | string[] $filterPatterns = [] ) : array
$directory string
$recursive boolean
$filterPatterns string | string[]
리턴 array

getFiles() 공개 메소드

List files of a directory.
public getFiles ( string $directory = '', boolean $recursive = false, string | string[] $filterPatterns = [] ) : array
$directory string
$recursive boolean
$filterPatterns string | string[]
리턴 array

getMimetype() 공개 메소드

Get mimetype of a file.
public getMimetype ( string $path ) : string
$path string
리턴 string

getSize() 공개 메소드

Returns size of a file.
public getSize ( $path ) : integer
$path
리턴 integer

getTimestamp() 공개 메소드

Get timestamp of a file.
public getTimestamp ( string $path ) : string
$path string
리턴 string

getType() 공개 메소드

Get type of a file.
public getType ( string $path ) : string
$path string
리턴 string

getVisibility() 공개 메소드

Get visibility of a file or directory.
public getVisibility ( string $path ) : string
$path string
리턴 string

isDir() 공개 메소드

Check if path is a file.
public isDir ( string $path ) : boolean
$path string
리턴 boolean

isFile() 공개 메소드

Check if path is a file.
public isFile ( string $path ) : boolean
$path string
리턴 boolean

isPrivate() 공개 메소드

Check if file or directory is private.
public isPrivate ( string $path = '' ) : boolean
$path string
리턴 boolean

isPublic() 공개 메소드

Check if file or directory is public.
public isPublic ( string $path = '' ) : boolean
$path string
리턴 boolean

move() 공개 메소드

Move (rename) a file or directory.
public move ( string $source, string $destination )
$source string
$destination string

prepend() 공개 메소드

Prepends contents to file.
public prepend ( string $path, string $contents )
$path string
$contents string

read() 공개 메소드

Read a file.
public read ( string $path ) : string
$path string
리턴 string

removeDir() 공개 메소드

Remove a directory.
public removeDir ( string $dirname )
$dirname string

removeFile() 공개 메소드

Remove a file.
public removeFile ( string $path )
$path string

req() 공개 메소드

Require a file.
public req ( string $path ) : mixed
$path string
리턴 mixed

setPrivate() 공개 메소드

Sets visibility of file or directory to private.
public setPrivate ( string $path = '' )
$path string

setPublic() 공개 메소드

Sets visibility of file or directory to public.
public setPublic ( string $path = '' )
$path string

setVisibility() 공개 메소드

Set visibility of a file or directory.
public setVisibility ( string $path, string $visibility )
$path string
$visibility string

write() 공개 메소드

Overwrite existing file.
public write ( string $path, string $contents )
$path string
$contents string