static string mimetypeInternalDetect(
string
$path
)
|
|
Detect file mimetype using "internal" method
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
bool allowCreate(
string
$dir, string
$name
)
|
|
Return true if file with given name can be created in given folder.
Parameters:
string |
$dir: |
parent dir path |
string |
$name: |
new file name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
void archive(
$hashes,
$mime
)
|
|
Add files to archive
Parameters:
API Tags:
bool attr(
string
$path, string
$name, [bool
$val = null]
)
|
|
Check file attribute
Parameters:
string |
$path: |
file path |
string |
$name: |
attribute name (read|write|locked|hidden) |
bool |
$val: |
attribute value returned by file system |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
void cacheDir(
string
$path
)
|
|
Get stat for folder content and put in cache
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|bool canCreateTmb(
string
$path, array
$stat
)
|
|
Return true if thumnbnail for required file can be created
Parameters:
string |
$path: |
thumnbnail path |
array |
$stat: |
file stat |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|bool canResize(
string
$path, array
$stat
)
|
|
Return true if required file can be resized.
By default - the same as canCreateTmb
Parameters:
string |
$path: |
thumnbnail path |
array |
$stat: |
file stat |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|false childsByAttr(
string
$path, string
$attr, bool
$val
)
|
|
Return first found children with required attr == $val
Parameters:
string |
$path: |
file path |
string |
$attr: |
attribute name |
bool |
$val: |
attribute value |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Clean cache
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
void close(
Resource
$fp, string
$hash
)
|
|
Close file pointer
Parameters:
Resource |
$fp: |
file pointer |
string |
$hash: |
file hash |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|false closest(
string
$hash, string
$attr, bool
$val
)
|
|
Return file/dir hash or first founded child hash with required attr == $val
Parameters:
string |
$hash: |
file hash |
string |
$attr: |
attribute name |
bool |
$val: |
attribute value |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|false closestByAttr(
string
$path, string
$attr, bool
$val
)
|
|
If file has required attr == $val - return file path, If dir has child with has required attr == $val - return child path
Parameters:
string |
$path: |
file path |
string |
$attr: |
attribute name |
bool |
$val: |
attribute value |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
bool commandDisabled(
string
$cmd
)
|
|
Return true if command disabled in options
Parameters:
string |
$cmd: |
command name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Configure after successfull mount.
By default set thumbnails path and image manipulation library.
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string|false copy(
string
$src, string
$dst, string
$name
)
|
|
Copy file/recursive copy dir only in current volume.
Return new file path or false.
Parameters:
string |
$src: |
source path |
string |
$dst: |
destination dir path |
string |
$name: |
new file name (optionaly) |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|false copyFrom(
Object
$volume, string
$src, string
$destination, string
$name
)
|
|
Copy file from another volume.
Return new file path or false.
Parameters:
Object |
$volume: |
source volume |
string |
$src: |
source file hash |
string |
$destination: |
destination dir path |
string |
$name: |
file name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return true if copy from this volume allowed
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
int countSize(
string
$path
)
|
|
Return file/total directory size
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|false createTmb(
string
$path,
$stat, string
$mime
)
|
|
Create thumnbnail and return it's URL on success
Parameters:
string |
$path: |
file path |
string |
$mime: |
file mime type |
|
$stat: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
mixed crypt(
string
$path
)
|
|
Return crypted path Not implemented
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return debug info for client
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string decode(
string
$hash
)
|
|
Decode path from hash
Parameters:
API Tags:
Information Tags:
Author: | Troex Nevelin |
Author: | Dmitry (dio) Levashov |
Return root or startPath hash
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array dimensions(
string
$hash
)
|
|
Return image dimensions
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false dir(
string
$hash, [
$resolveLink = false], bool
$hidden
)
|
|
Return folder info
Parameters:
string |
$hash: |
folder hash |
bool |
$hidden: |
return hidden file info |
|
$resolveLink: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array doSearch(
string
$path, string
$q, array
$mimes
)
|
|
Recursive files search
Parameters:
string |
$path: |
dir path |
string |
$q: |
search string |
array |
$mimes: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return driver id. Used as a part of volume id.
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false duplicate(
string
$hash, [string
$suffix = 'copy']
)
|
|
Create file copy with suffix "copy number" and return its info
Parameters:
string |
$hash: |
file hash |
string |
$suffix: |
suffix to add to file name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string encode(
string
$path
)
|
|
Encode path into hash
Parameters:
API Tags:
Information Tags:
Author: | Troex Nevelin |
Author: | Dmitry (dio) Levashov |
Return error message from last failed action
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|bool extract(
string
$hash
)
|
|
Extract files from archive
Parameters:
string |
$hash: |
archive hash |
API Tags:
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov, |
array|false file(
string
$hash, bool
$realpath
)
|
|
Return file info or false on error
Parameters:
string |
$hash: |
file hash |
bool |
$realpath: |
add realpath field to file info |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
void gdImage(
resource
$image, string
$filename, string
$destformat, string
$mime
)
|
|
Output gd image to file
Parameters:
resource |
$image: |
gd image resource |
string |
$filename: |
The path to save the file to. |
string |
$destformat: |
The Image type to use for $filename |
string |
$mime: |
The original image mime type |
API Tags:
void gdImageBackground(
resource
$image, string
$bgcolor
)
|
|
Assign the proper background to a gd image
Parameters:
resource |
$image: |
gd image resource |
string |
$bgcolor: |
background color in #rrggbb format |
API Tags:
gd gdImageCreate(
string
$path, string
$mime
)
|
|
Create an gd image according to the specified mime type
Parameters:
string |
$path: |
image file |
string |
$mime: |
|
API Tags:
Return: | image resource identifier |
Access: | protected |
string|false getContents(
string
$hash
)
|
|
Return file contents
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
boolean|string getContentUrl(
string
$hash, [array
$options = array()]
)
|
|
Return content URL (for netmout volume driver) If file.url == 1 requests from JavaScript client with XHR
Parameters:
string |
$hash: |
file hash |
array |
$options: |
options array |
API Tags:
Information Tags:
array getScandir(
string
$path
)
|
|
Return required dir's files info.
If onlyMimes is set - return only dirs and files of required mimes
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return temp path
API Tags:
Information Tags:
string|false gettmb(
string
$path, array
$stat
)
|
|
Return thumnbnail name if exists
Parameters:
string |
$path: |
file path |
array |
$stat: |
file stat |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array gettree(
string
$path, int
$deep, [
$exclude = '']
)
|
|
Return subdirs tree
Parameters:
string |
$path: |
parent dir path |
int |
$deep: |
tree deep |
|
$exclude: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return volume id
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string|false imgCrop(
string
$path, int
$width, int
$height, bool
$x, bool
$y, [string
$destformat = null]
)
|
|
Crop image
Parameters:
string |
$path: |
image file |
int |
$width: |
crop width |
int |
$height: |
crop height |
bool |
$x: |
crop left offset |
bool |
$y: |
crop top offset |
string |
$destformat: |
image destination format |
API Tags:
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov |
string|false imgResize(
string
$path, int
$width, int
$height, [bool
$keepProportions = false], [bool
$resizeByBiggerSide = true], [string
$destformat = null]
)
|
|
Resize image
Parameters:
string |
$path: |
image file |
int |
$width: |
new width |
int |
$height: |
new height |
bool |
$keepProportions: |
crop image |
bool |
$resizeByBiggerSide: |
resize image based on bigger side if true |
string |
$destformat: |
image destination format |
API Tags:
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov |
string|false imgRotate(
string
$path, int
$degree, [string
$bgcolor = '#ffffff'], [string
$destformat = null]
)
|
|
Rotate image
Parameters:
string |
$path: |
image file |
int |
$degree: |
rotete degrees |
string |
$bgcolor: |
square background color in #rrggbb format |
string |
$destformat: |
image destination format |
API Tags:
Information Tags:
Author: | Troex Nevelin |
Author: | nao-pon |
string|false imgSquareFit(
string
$path, int
$width, int
$height, [int
$align = 'center'], [int
$valign = 'middle'], [string
$bgcolor = '#0000ff'], [string
$destformat = null]
)
|
|
Put image to square
Parameters:
string |
$path: |
image file |
int |
$width: |
square width |
int |
$height: |
square height |
int |
$align: |
reserved |
int |
$valign: |
reserved |
string |
$bgcolor: |
square background color in #rrggbb format |
string |
$destformat: |
image destination format |
API Tags:
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov |
Prepare driver before mount volume.
Return true if volume is ready.
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return true if voume is readable.
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
bool isSameType(
string
$mime1, string
$mime2
)
|
|
Return true if all mimes is directory or files
Parameters:
string |
$mime1: |
mimetype |
string |
$mime2: |
mimetype |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return dir files names list
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
bool|null mimeAccepted(
string
$mime, [array
$mimes = array()], [bool|null
$empty = true]
)
|
|
Return true if mime is required mimes list
Parameters:
string |
$mime: |
mime type to check |
array |
$mimes: |
allowed mime types list or not set to use client mimes list |
bool|null |
$empty: |
what to return on empty list |
API Tags:
Information Tags:
Author: | Troex Nevelin |
Author: | Dmitry (dio) Levashov |
string mimetype(
string
$path, [
$name = '']
)
|
|
Return file mimetype
Parameters:
string |
$path: |
file path |
|
$name: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false mkdir(
string
$dst, string
$name
)
|
|
Create directory and return dir info
Parameters:
string |
$dst: |
destination directory |
string |
$name: |
directory name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false mkfile(
string
$dst, string
$name
)
|
|
Create empty file and return its info
Parameters:
string |
$dst: |
destination directory |
string |
$name: |
file name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
"Mount" volume.
Return true if volume available for read or write, false - otherwise
Parameters:
API Tags:
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov |
string|false move(
string
$src, string
$dst, string
$name
)
|
|
Move file Return new file path or false.
Parameters:
string |
$src: |
source path |
string |
$dst: |
destination dir path |
string |
$name: |
new file name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
bool nameAccepted(
string
$name
)
|
|
Validate file name based on $this->options['acceptedName'] regexp
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Resource open(
string
$hash
)
|
|
Open file for reading and return file pointer
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return volume options required by client:
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array parents(
string
$hash
)
|
|
Return part of dirs tree from required dir up to root dir
Parameters:
string |
$hash: |
directory hash |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false paste(
Object
$volume,
$src, string
$dst, [bool
$rmSrc = false], string
$source
)
|
|
Paste files
Parameters:
Object |
$volume: |
source volume |
string |
$source: |
file hash |
string |
$dst: |
destination dir hash |
bool |
$rmSrc: |
remove source after copy? |
|
$src: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string path(
string
$hash
)
|
|
Return file path related to root
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
int procExec(
string
$command, [
&$output = null], [
&$return_var = -1], [
&$error_output = null], array
$output, array
$return_var, array
$error_output
)
|
|
Execute shell command
Parameters:
string |
$command: |
command line |
array |
$output: |
stdout strings |
array |
$return_var: |
process exit code |
array |
$error_output: |
stderr strings |
array |
&$output: |
|
|
&$return_var: |
|
array |
&$error_output: |
|
API Tags:
Return: | exit code |
Access: | protected |
Information Tags:
array putContents(
string
$hash, string
$content
)
|
|
Put content in text file and return file info.
Parameters:
string |
$hash: |
file hash |
string |
$content: |
new file content |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string realpath(
string
$hash
)
|
|
Return file real path if file exists
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
bool remove(
string
$path, [bool
$force = false]
)
|
|
Remove file/ recursive remove dir
Parameters:
string |
$path: |
file path |
bool |
$force: |
try to remove even if file locked |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return list of moved/overwrited files
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false rename(
string
$hash, string
$name
)
|
|
Rename file and return file info
Parameters:
string |
$hash: |
file hash |
string |
$name: |
new file name |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Clean removed files list
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false resize(
string
$hash, int
$width, int
$height, int
$x, int
$y, [string
$mode = 'resize'], [
$bg = ''], [
$degree = 0]
)
|
|
Resize image
Parameters:
string |
$hash: |
image file |
int |
$width: |
new width |
int |
$height: |
new height |
int |
$x: |
X start poistion for crop |
int |
$y: |
Y start poistion for crop |
string |
$mode: |
action how to mainpulate image |
|
$bg: |
|
|
$degree: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Author: | Troex Nevelin |
Author: | Alexey Sukhotin |
Author: | nao-pon |
Remove file/dir
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
void rmTmb(
string
$stat
)
|
|
Remove thumbnail, also remove recursively if stat is directory
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Author: | Naoki Sawada |
Author: | Troex Nevelin |
Return root folder hash
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false scandir(
string
$hash
)
|
|
Return directory content or false on error
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array search(
string
$q, array
$mimes
)
|
|
Search files
Parameters:
string |
$q: |
search string |
array |
$mimes: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
false setError(
array
$error
)
|
|
Save error message
Parameters:
API Tags:
Information Tags:
Author: | Dmitry(dio) Levashov |
void setMimesFilter(
array
$mimes
)
|
|
Set mimetypes allowed to display to client
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Return file size / total directory size
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array stat(
string
$path
)
|
|
Return fileinfo
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
int|bool stripos(
string
$haystack, string
$needle, [int
$offset = 0]
)
|
|
Find position of first occurrence of string in a string with multibyte support
Parameters:
string |
$haystack: |
The string being checked. |
string |
$needle: |
The string to find in haystack. |
int |
$offset: |
The search offset. If it is not specified, 0 is used. |
API Tags:
Information Tags:
string|false tmb(
$hash
)
|
|
Create thumbnail for required file and return its name of false on failed
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string tmbname(
array
$stat
)
|
|
Return thumbnail file name for required file
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false tree(
[string
$hash = ''], [int
$deep = 0], [string
$exclude = '']
)
|
|
Return subfolders for required folder or false on error
Parameters:
string |
$hash: |
folder hash or empty string to get tree from root folder |
int |
$deep: |
subdir deep |
string |
$exclude: |
dir hash which subfolders must be exluded from result, required to not get stat twice on cwd subfolders |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
Some "unmount" stuffs - may be required by virtual fs
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
mixed uncrypt(
mixed
$hash
)
|
|
Return uncrypted path Not implemented
Parameters:
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string uniqueName(
$dir,
$name, [string
$suffix = ' copy'], [
$checkNum = true], string
$path
)
|
|
Return new unique name based on file name and suffix
Parameters:
string |
$path: |
file path |
string |
$suffix: |
suffix append to name |
|
$dir: |
|
|
$name: |
|
|
$checkNum: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array updateCache(
string
$path, array
$stat
)
|
|
Put file stat in cache and return it
Parameters:
string |
$path: |
file path |
array |
$stat: |
file stat |
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
array|false upload(
Resource
$fp, string
$dst,
$name, string
$tmpname, string
$src
)
|
|
Save uploaded file.
On success return array with new file stat and with removed file hash (if existed file was replaced)
Parameters:
Resource |
$fp: |
file pointer |
string |
$dst: |
destination folder hash |
string |
$src: |
file name |
string |
$tmpname: |
file tmp name - required to detect mime type |
|
$name: |
|
API Tags:
Information Tags:
Author: | Dmitry (dio) Levashov |
string _abspath(
string
$path
)
|
|
Convert path related to root dir into real path
Parameters:
string |
$path: |
rel file path |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string|bool _archive(
string
$dir, array
$files, string
$name, array
$arc
)
|
|
Create archive and return its path
Parameters:
string |
$dir: |
target dir |
array |
$files: |
files names list |
string |
$name: |
archive name |
array |
$arc: |
archiver options |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov, |
Redefined in descendants as:
string _basename(
string
$path
)
|
|
Return file name
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
Detect available archivers
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov, |
Redefined in descendants as:
bool _copy(
string
$source,
$targetDir, string
$name, string
$target
)
|
|
Copy file into another file (only inside one volume)
Parameters:
string |
$source: |
source file path |
string |
$target: |
target dir path |
string |
$name: |
file name |
|
$targetDir: |
|
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string _dimensions(
string
$path, string
$mime
)
|
|
Return object width and height Ususaly used for images, but can be realize for video etc...
Parameters:
string |
$path: |
file path |
string |
$mime: |
file mime type |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string _dirname(
string
$path
)
|
|
Return parent directory path
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _extract(
string
$path, array
$arc
)
|
|
Extract files from archive
Parameters:
string |
$path: |
file path |
array |
$arc: |
archiver options |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Alexey Sukhotin |
Author: | Dmitry (dio) Levashov, |
Redefined in descendants as:
bool _fclose(
resource
$fp, [string
$path = '']
)
|
|
Close opened file
Parameters:
resource |
$fp: |
file pointer |
string |
$path: |
file path |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _filePutContents(
string
$path, string
$content
)
|
|
Write a string to a file
Parameters:
string |
$path: |
file path |
string |
$content: |
new file content |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
resource|false _fopen(
string
$path, [
$mode = "rb"], bool
$write
)
|
|
Open file and return file pointer
Parameters:
string |
$path: |
file path |
bool |
$write: |
open file for writing |
|
$mode: |
|
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string|false _getContents(
string
$path
)
|
|
Get file contents
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _inpath(
string
$path, string
$parent
)
|
|
Return true if $path is children of $parent
Parameters:
string |
$path: |
path to check |
string |
$parent: |
parent path |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string _joinPath(
string
$dir, string
$name
)
|
|
Join dir name and file name and return full path.
Some drivers (db) use int as path - so we give to concat path to driver itself
Parameters:
string |
$dir: |
dir path |
string |
$name: |
file name |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string|bool _mkdir(
string
$path, string
$name
)
|
|
Create dir and return created dir path or false on failed
Parameters:
string |
$path: |
parent dir path |
string |
$name: |
new directory name |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string|bool _mkfile(
string
$path, string
$name
)
|
|
Create file and return it's path or false on failed
Parameters:
string |
$path: |
parent dir path |
string |
$name: |
new file name |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string|bool _move(
string
$source,
$targetDir, string
$name, string
$target
)
|
|
Move file into another parent dir.
Return new file path or false.
Parameters:
string |
$source: |
source file path |
string |
$target: |
target dir path |
string |
$name: |
file name |
|
$targetDir: |
|
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string _normpath(
string
$path
)
|
|
Return normalized path
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string _path(
string
$path
)
|
|
Return fake path started from root dir.
Required to show path on client side.
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
string _relpath(
string
$path
)
|
|
Return file path related to root dir
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _rmdir(
string
$path
)
|
|
Remove dir
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool|string _save(
resource
$fp, string
$dir, string
$name, array
$stat
)
|
|
Create new file and write into it from file pointer.
Return new file path or false on error.
Parameters:
resource |
$fp: |
file pointer |
string |
$dir: |
target dir path |
string |
$name: |
file name |
array |
$stat: |
file stat (required by some virtual fs) |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
array _scandir(
string
$path
)
|
|
Return files list in directory
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
array|false _stat(
string
$path
)
|
|
Return stat for given path.
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.
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _subdirs(
string
$path
)
|
|
Return true if path is dir and has at least one childs directory
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _symlink(
string
$source, string
$targetDir, string
$name
)
|
|
Create symlink
Parameters:
string |
$source: |
file to link to |
string |
$targetDir: |
folder to create link in |
string |
$name: |
symlink name |
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as:
bool _unlink(
string
$path
)
|
|
Remove file
Parameters:
API Tags:
Abstract: | |
Access: | protected |
Information Tags:
Author: | Dmitry (dio) Levashov |
Redefined in descendants as: