PHP 클래스 elFinderVolumeLocalFileSystem

저자: Dmitry (dio) Levashov
저자: Troex Nevelin
상속: extends elFinderVolumeDriver
파일 보기 프로젝트 열기: studio-42/elfinder 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$archiveSize integer Required to count total archive files size
$driverId string Driver id Must be started from letter and contains [a-z0-9] Used as part of volume id

공개 메소드들

메소드 설명
__construct ( ) Constructor Extend options with required fields
localFileSystemInotify ( string $path, integer $standby, number $compare ) : number | boolean Long pooling sync checker This function require server command inotifywait If inotifywait need full path, Please add define('ELFINER_INOTIFYWAIT_PATH', '/PATH_TO/inotifywait'); into connector.php
localFileSystemSearchIteratorFilter ( $file, $key, $iterator ) ****************** Original local functions ************************

보호된 메소드들

메소드 설명
_abspath ( string $path ) : string Convert path related to root dir into real path
_archive ( string $dir, array $files, string $name, array $arc ) : string | boolean Create archive and return its path
_basename ( string $path ) : string Return file name
_checkArchivers ( ) : void Detect available archivers
_chmod ( string $path, string $mode ) : boolean chmod availability
_copy ( string $source, string $targetDir, string $name ) : boolean Copy file into another file
_dimensions ( string $path, string $mime ) : string Return object width and height Usualy used for images, but can be realize for video etc.
_dirname ( string $path ) : string Return parent directory path
_extract ( string $path, array $arc ) : true Extract files from archive
_fclose ( resource $fp, string $path = '' ) : boolean Close opened file
_filePutContents ( string $path, string $content ) : boolean Write a string to a file
_findSymlinks ( string $path ) : boolean Recursive symlinks search
_fopen ( string $path, string $mode = 'rb' ) : false | resource Open file and return file pointer
_getContents ( string $path ) : string | false Get file contents
_inpath ( string $path, string $parent ) : boolean Return true if $path is children of $parent
_joinPath ( string $dir, string $name ) : string Join dir name and file name and retur full path
_mkdir ( string $path, string $name ) : string | boolean Create dir and return created dir path or false on failed
_mkfile ( string $path, string $name ) : string | boolean Create file and return it's path or false on failed
_move ( string $source, $targetDir, string $name ) : boolean | string Move file into another parent dir.
_normpath ( string $path ) : string Return normalized path, this works the same as os.path.normpath() in Python
_path ( string $path ) : string Return fake path started from root dir
_relpath ( string $path ) : string Return file path related to root dir
_rmdir ( string $path ) : boolean Remove dir
_save ( resource $fp, string $dir, string $name, array $stat ) : boolean | string Create new file and write into it from file pointer.
_scandir ( string $path ) : array Return files list in directory.
_stat ( string $path ) : array | false Return stat for given path.
_subdirs ( string $path ) : boolean Return true if path is dir and has at least one childs directory
_symlink ( string $source, string $targetDir, string $name ) : boolean Create symlink
_unlink ( string $path ) : boolean Remove file
configure ( ) : void Configure after successfull mount.
delTree ( string $localpath ) : boolean Delete dirctory trees
doSearch ( string $path, string $q, array $mimes ) : array Recursive files search
getOwnerStat ( integer $uid, integer $gid ) : array Get stat owner, group and isowner by uid and gid Sub-fuction of _stat() and _scandir()
getWorkFile ( string $path ) : string File path of local server side work file path
init ( ) : boolean Prepare driver before mount volume.
readlink ( string $path ) : string Return symlink target file

메소드 상세

__construct() 공개 메소드

Constructor Extend options with required fields
저자: Dmitry (dio) Levashov
public __construct ( )

_abspath() 보호된 메소드

Convert path related to root dir into real path
저자: Dmitry (dio) Levashov
protected _abspath ( string $path ) : string
$path string file path
리턴 string

_archive() 보호된 메소드

Create archive and return its path
저자: Dmitry (dio) Levashov,
저자: Alexey Sukhotin
protected _archive ( string $dir, array $files, string $name, array $arc ) : string | boolean
$dir string target dir
$files array files names list
$name string archive name
$arc array archiver options
리턴 string | boolean

_basename() 보호된 메소드

Return file name
저자: Dmitry (dio) Levashov
protected _basename ( string $path ) : string
$path string file path
리턴 string

_checkArchivers() 보호된 메소드

Detect available archivers
protected _checkArchivers ( ) : void
리턴 void

_chmod() 보호된 메소드

chmod availability
protected _chmod ( string $path, string $mode ) : boolean
$path string
$mode string
리턴 boolean

_copy() 보호된 메소드

Copy file into another file
저자: Dmitry (dio) Levashov
protected _copy ( string $source, string $targetDir, string $name ) : boolean
$source string source file path
$targetDir string target directory path
$name string new file name
리턴 boolean

_dimensions() 보호된 메소드

..
저자: Dmitry (dio) Levashov
protected _dimensions ( string $path, string $mime ) : string
$path string file path
$mime string file mime type
리턴 string

_dirname() 보호된 메소드

Return parent directory path
저자: Dmitry (dio) Levashov
protected _dirname ( string $path ) : string
$path string file path
리턴 string

_extract() 보호된 메소드

Extract files from archive
저자: Dmitry (dio) Levashov,
저자: Alexey Sukhotin
protected _extract ( string $path, array $arc ) : true
$path string archive path
$arc array archiver command and arguments (same as in $this->archivers)
리턴 true

_fclose() 보호된 메소드

Close opened file
저자: Dmitry (dio) Levashov
protected _fclose ( resource $fp, string $path = '' ) : boolean
$fp resource file pointer
$path string
리턴 boolean

_filePutContents() 보호된 메소드

Write a string to a file
저자: Dmitry (dio) Levashov
protected _filePutContents ( string $path, string $content ) : boolean
$path string file path
$content string new file content
리턴 boolean

_fopen() 보호된 메소드

Open file and return file pointer
저자: Dmitry (dio) Levashov
protected _fopen ( string $path, string $mode = 'rb' ) : false | resource
$path string file path
$mode string
리턴 false | resource

_getContents() 보호된 메소드

Get file contents
저자: Dmitry (dio) Levashov
protected _getContents ( string $path ) : string | false
$path string file path
리턴 string | false

_inpath() 보호된 메소드

Return true if $path is children of $parent
저자: Dmitry (dio) Levashov
protected _inpath ( string $path, string $parent ) : boolean
$path string path to check
$parent string parent path
리턴 boolean

_joinPath() 보호된 메소드

Join dir name and file name and retur full path
저자: Dmitry (dio) Levashov
protected _joinPath ( string $dir, string $name ) : string
$dir string
$name string
리턴 string

_mkdir() 보호된 메소드

Create dir and return created dir path or false on failed
저자: Dmitry (dio) Levashov
protected _mkdir ( string $path, string $name ) : string | boolean
$path string parent dir path
$name string new directory name
리턴 string | boolean

_mkfile() 보호된 메소드

Create file and return it's path or false on failed
저자: Dmitry (dio) Levashov
protected _mkfile ( string $path, string $name ) : string | boolean
$path string parent dir path
$name string new file name
리턴 string | boolean

_move() 보호된 메소드

Return new file path or false.
저자: Dmitry (dio) Levashov
protected _move ( string $source, $targetDir, string $name ) : boolean | string
$source string source file path
$targetDir
$name string file name
리턴 boolean | string

_normpath() 보호된 메소드

Return normalized path, this works the same as os.path.normpath() in Python
저자: Troex Nevelin
protected _normpath ( string $path ) : string
$path string path
리턴 string

_path() 보호된 메소드

Return fake path started from root dir
저자: Dmitry (dio) Levashov
protected _path ( string $path ) : string
$path string file path
리턴 string

_relpath() 보호된 메소드

Return file path related to root dir
저자: Dmitry (dio) Levashov
protected _relpath ( string $path ) : string
$path string file path
리턴 string

_rmdir() 보호된 메소드

Remove dir
저자: Dmitry (dio) Levashov
protected _rmdir ( string $path ) : boolean
$path string dir path
리턴 boolean

_save() 보호된 메소드

Return new file path or false on error.
저자: Dmitry (dio) Levashov
protected _save ( resource $fp, string $dir, string $name, array $stat ) : boolean | string
$fp resource file pointer
$dir string target dir path
$name string file name
$stat array file stat (required by some virtual fs)
리턴 boolean | string

_scandir() 보호된 메소드

Return files list in directory.
저자: Dmitry (dio) Levashov
protected _scandir ( string $path ) : array
$path string dir path
리턴 array

_stat() 보호된 메소드

Stat contains following fields: - (int) size file size in b. required - (int) ts file modification time in unix time. required - (string) mime mimetype. required for folders, others - optionally - (bool) read read permissions. required - (bool) write write permissions. required - (bool) locked is object locked. optionally - (bool) hidden is object hidden. optionally - (string) alias for symlinks - link target path relative to root path. optionally - (string) target for symlinks - link target path. optionally If file does not exists - returns empty array or false.
저자: Dmitry (dio) Levashov
protected _stat ( string $path ) : array | false
$path string file path
리턴 array | false

_subdirs() 보호된 메소드

Return true if path is dir and has at least one childs directory
저자: Dmitry (dio) Levashov
protected _subdirs ( string $path ) : boolean
$path string dir path
리턴 boolean

configure() 보호된 메소드

Configure after successfull mount.
저자: Dmitry (dio) Levashov
protected configure ( ) : void
리턴 void

delTree() 보호된 메소드

Delete dirctory trees
저자: Naoki Sawada
protected delTree ( string $localpath ) : boolean
$localpath string path need convert encoding to server encoding
리턴 boolean

doSearch() 보호된 메소드

Recursive files search
저자: Dmitry (dio) Levashov
저자: Naoki Sawada
protected doSearch ( string $path, string $q, array $mimes ) : array
$path string dir path
$q string search string
$mimes array
리턴 array

getOwnerStat() 보호된 메소드

Get stat owner, group and isowner by uid and gid Sub-fuction of _stat() and _scandir()
protected getOwnerStat ( integer $uid, integer $gid ) : array
$uid integer
$gid integer
리턴 array stat

getWorkFile() 보호된 메소드

File path of local server side work file path
저자: Naoki Sawada
protected getWorkFile ( string $path ) : string
$path string
리턴 string

init() 보호된 메소드

Return true if volume is ready.
protected init ( ) : boolean
리턴 boolean

localFileSystemInotify() 공개 메소드

Long pooling sync checker This function require server command inotifywait If inotifywait need full path, Please add define('ELFINER_INOTIFYWAIT_PATH', '/PATH_TO/inotifywait'); into connector.php
public localFileSystemInotify ( string $path, integer $standby, number $compare ) : number | boolean
$path string
$standby integer
$compare number
리턴 number | boolean

localFileSystemSearchIteratorFilter() 공개 메소드

****************** Original local functions ************************
public localFileSystemSearchIteratorFilter ( $file, $key, $iterator )
$file
$key
$iterator

프로퍼티 상세

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

Required to count total archive files size
protected int $archiveSize
리턴 integer

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

Driver id Must be started from letter and contains [a-z0-9] Used as part of volume id
protected string $driverId
리턴 string