PHP 클래스 Jarves\Filesystem\Filesystem

상속: implements Jarves\Filesystem\FilesystemInterface
파일 보기 프로젝트 열기: jarves/jarves 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$adapter Jarves\Filesystem\Adapter\AdapterInterface

공개 메소드들

메소드 설명
checkFileValues ( FileInfo $file, File $databaseFile )
copy ( $source, $target )
createFromPathInfo ( Jarves\File\FileInfoInterface $fileInfo )
delete ( string $path ) : boolean
filemtime ( $path )
getAdapter ( string | null $path = null ) : Jarves\Filesystem\Adapter\AdapterInterface
getCount ( string $folderPath ) : mixed Returns the file count inside $folderPath
getFile ( string $path ) : Jarves\File\FileInfoInterface Return information for a file/folder.
getFiles ( string $path ) : File[] List directory contents.
getResizeMax ( string $path, integer $width, integer $height ) : PHPImageWorkshop\Core\ImageWorkshopLayer Resize a image and returns it's object.
getThumbnail ( string $path, string $resolution, boolean $resize = false ) : resource
handle ( string $path ) : resource
has ( string $path ) : boolean
hash ( $path )
mkdir ( $path )
move ( $source, $target )
normalizePath ( string | array $path ) : string Removes the name of the mount point from the proper layer.
read ( string $path ) : string
remove ( string $path ) : boolean
rename ( $source, $target )
search ( $path, $q, $depth ) : array
setAdapter ( Jarves\Filesystem\Adapter\AdapterInterface $adapter )
write ( string $path, string $content = '' ) : boolean
writeImage ( resource $image, string $path, integer $quality = 8 ) : boolean

메소드 상세

checkFileValues() 공개 메소드

public checkFileValues ( FileInfo $file, File $databaseFile )
$file Jarves\File\FileInfo
$databaseFile Jarves\Model\File

copy() 공개 메소드

public copy ( $source, $target )

createFromPathInfo() 공개 메소드

public createFromPathInfo ( Jarves\File\FileInfoInterface $fileInfo )
$fileInfo Jarves\File\FileInfoInterface

delete() 공개 메소드

public delete ( string $path ) : boolean
$path string
리턴 boolean

filemtime() 공개 메소드

public filemtime ( $path )

getAdapter() 공개 메소드

public getAdapter ( string | null $path = null ) : Jarves\Filesystem\Adapter\AdapterInterface
$path string | null
리턴 Jarves\Filesystem\Adapter\AdapterInterface

getCount() 공개 메소드

Returns the file count inside $folderPath
public getCount ( string $folderPath ) : mixed
$folderPath string
리턴 mixed

getFile() 공개 메소드

The result contains following information: [path(relative), name, type(dir|file), ctime(unixtimestamp), mtime(unixtimestamp), size(bytes)] array( path => path to this file/folder for usage in the administration and modules. Not the full http path. No trailing slash! name => basename(path) ctime => as unix timestamps mtime => as unix timestamps size => filesize in bytes (not for folders) type => 'dir' or 'file' )
public getFile ( string $path ) : Jarves\File\FileInfoInterface
$path string
리턴 Jarves\File\FileInfoInterface

getFiles() 공개 메소드

Same as in getFile() but in a list. array( array( path => path to the file/folder for usage in the administration and modules. Not the full http path. No trailing slash! name => basename(path) ctime => as unix timestamps mtime => as unix timestamps size => filesize in bytes (not for folders) type => 'file' | 'dir' mount => boolean (if the folder is a mount point) ) )
public getFiles ( string $path ) : File[]
$path string
리턴 Jarves\Model\File[]

getResizeMax() 공개 메소드

Resize a image and returns it's object.
public getResizeMax ( string $path, integer $width, integer $height ) : PHPImageWorkshop\Core\ImageWorkshopLayer
$path string
$width integer
$height integer
리턴 PHPImageWorkshop\Core\ImageWorkshopLayer

getThumbnail() 공개 메소드

public getThumbnail ( string $path, string $resolution, boolean $resize = false ) : resource
$path string
$resolution string x
$resize boolean
리턴 resource

handle() 공개 메소드

public handle ( string $path ) : resource
$path string
리턴 resource

has() 공개 메소드

public has ( string $path ) : boolean
$path string
리턴 boolean

hash() 공개 메소드

public hash ( $path )

mkdir() 공개 메소드

public mkdir ( $path )

move() 공개 메소드

public move ( $source, $target )

normalizePath() 공개 메소드

Also removes '..' and replaces '//' => '/' This is needed because the file layer gets the relative path under his own root. Forces a / at the beginning, removes the trailing / if exists.
public normalizePath ( string | array $path ) : string
$path string | array
리턴 string

read() 공개 메소드

public read ( string $path ) : string
$path string
리턴 string

remove() 공개 메소드

public remove ( string $path ) : boolean
$path string
리턴 boolean

rename() 공개 메소드

public rename ( $source, $target )

setAdapter() 공개 메소드

public setAdapter ( Jarves\Filesystem\Adapter\AdapterInterface $adapter )
$adapter Jarves\Filesystem\Adapter\AdapterInterface

write() 공개 메소드

public write ( string $path, string $content = '' ) : boolean
$path string
$content string
리턴 boolean

writeImage() 공개 메소드

public writeImage ( resource $image, string $path, integer $quality = 8 ) : boolean
$image resource
$path string
$quality integer between 0 and 10
리턴 boolean

프로퍼티 상세

$adapter 보호되어 있는 프로퍼티

protected AdapterInterface,Jarves\Filesystem\Adapter $adapter
리턴 Jarves\Filesystem\Adapter\AdapterInterface