[ class tree: core ] [ index: core ] [ all elements ]

Class: elFinderVolumeDriver

Source Location: /zp-extensions/elFinder/php/elFinderVolumeDriver.class.php

Class elFinderVolumeDriver

Class Overview

Base class for elFinder volume.

Provide 2 layers:

  1. Public API (commands)
  2. abstract fs API
All abstract methods begin with "_"

Located in /zp-extensions/elFinder/php/elFinderVolumeDriver.class.php [line 14]



		
				Author(s):
		
  • Dmitry (dio) Levashov
  • Troex Nevelin
  • Alexey Sukhotin
API Tags:
Abstract:  

Information Tags:

Properties

Methods

[ Top ]
Descendants
Child Class Description
elFinderVolumeLocalFileSystem elFinder driver for local filesystem.

[ Top ]
Property Summary
static array   $mimetypes   default extensions/mimetypes for mimeDetect == 'internal'
mixed   $access   Access control function/class
array   $archivers   Archivers config
mixed   $attributes   Access control function/class
array   $cache   Cache storage
string   $cryptLib   Library to crypt files name
array   $defaults   Defaults permissions
array   $diabled   List of disabled client's commands
array   $dirsCache   Cache by folders
string   $driverId   Driver id Must be started from letter and contains [a-z0-9] Used as part of volume id
array   $error   Errors from last failed action
object   $finfo   Finfo object for mimeDetect == 'finfo'
string   $id   Volume id - used as prefix for files hashes
string   $imgLib   Image manipulation lib name auto|imagick|mogtify|gd
string   $mimeDetect   Mimetype detect method
bool   $mounted   Flag - volume "mounted" and available
array   $onlyMimes   Mimetypes allowed to display
array   $options   Object configuration
array   $removed   Store files moved or overwrited files info
string   $root   Root directory path
string   $rootName   Root basename | alias
string   $separator   Directory separator - required by client
string   $startPath   Default directory to open
string   $tmbPath   Thumbnails dir path
bool   $tmbPathWritable   Is thumbnails dir writable
int   $tmbSize   Thumbnails size in px
string   $tmbURL   Thumbnails base URL
int   $today   Today 24:00 timestamp
int   $treeDeep   How many subdirs levels return for tree
array   $uploadAllow   Mime types allowed to upload
array   $uploadDeny   Mime types denied to upload
int|string   $uploadMaxSize   Maximum allowed upload file size.
array   $uploadOrder   Order to validate uploadAllow and uploadDeny
string   $URL   Base URL
int   $yesterday   Yesterday 24:00 timestamp

[ Top ]
Method Summary
static string   mimetypeInternalDetect()   Detect file mimetype using "internal" method
bool   allowCreate()   Return true if file with given name can be created in given folder.
void   archive()   Add files to archive
bool   attr()   Check file attribute
void   cacheDir()   Get stat for folder content and put in cache
string|bool   canCreateTmb()   Return true if thumnbnail for required file can be created
string|bool   canResize()   Return true if required file can be resized.
string|false   childsByAttr()   Return first found children with required attr == $val
void   clearcache()   Clean cache
void   close()   Close file pointer
string|false   closest()   Return file/dir hash or first founded child hash with required attr == $val
string|false   closestByAttr()   If file has required attr == $val - return file path, If dir has child with has required attr == $val - return child path
bool   commandDisabled()   Return true if command disabled in options
void   configure()   Configure after successfull mount.
string|false   copy()   Copy file/recursive copy dir only in current volume.
string|false   copyFrom()   Copy file from another volume.
bool   copyFromAllowed()   Return true if copy from this volume allowed
int   countSize()   Return file/total directory size
string|false   createTmb()   Create thumnbnail and return it's URL on success
mixed   crypt()   Return crypted path Not implemented
array   debug()   Return debug info for client
string   decode()   Decode path from hash
string   defaultPath()   Return root or startPath hash
array   dimensions()   Return image dimensions
array|false   dir()   Return folder info
array   doSearch()   Recursive files search
string   driverId()   Return driver id. Used as a part of volume id.
array|false   duplicate()   Create file copy with suffix "copy number" and return its info
string   encode()   Encode path into hash
array   error()   Return error message from last failed action
array|bool   extract()   Extract files from archive
array|false   file()   Return file info or false on error
void   gdImage()   Output gd image to file
void   gdImageBackground()   Assign the proper background to a gd image
gd   gdImageCreate()   Create an gd image according to the specified mime type
string|false   getContents()   Return file contents
boolean|string   getContentUrl()   Return content URL (for netmout volume driver) If file.url == 1 requests from JavaScript client with XHR
array   getScandir()   Return required dir's files info.
string   getTempPath()   Return temp path
string|false   gettmb()   Return thumnbnail name if exists
array   gettree()   Return subdirs tree
string   id()   Return volume id
string|false   imgCrop()   Crop image
string|false   imgResize()   Resize image
string|false   imgRotate()   Rotate image
string|false   imgSquareFit()   Put image to square
bool   init()   Prepare driver before mount volume.
bool   isReadable()   Return true if voume is readable.
bool   isSameType()   Return true if all mimes is directory or files
array   ls()   Return dir files names list
bool|null   mimeAccepted()   Return true if mime is required mimes list
string   mimetype()   Return file mimetype
array|false   mkdir()   Create directory and return dir info
array|false   mkfile()   Create empty file and return its info
bool   mount()   "Mount" volume.
string|false   move()   Move file Return new file path or false.
bool   nameAccepted()   Validate file name based on $this->options['acceptedName'] regexp
Resource   open()   Open file for reading and return file pointer
array   options()   Return volume options required by client:
array   parents()   Return part of dirs tree from required dir up to root dir
array|false   paste()   Paste files
string   path()   Return file path related to root
int   procExec()   Execute shell command
array   putContents()   Put content in text file and return file info.
string   realpath()   Return file real path if file exists
bool   remove()   Remove file/ recursive remove dir
array   removed()   Return list of moved/overwrited files
array|false   rename()   Rename file and return file info
void   resetRemoved()   Clean removed files list
array|false   resize()   Resize image
bool   rm()   Remove file/dir
void   rmTmb()   Remove thumbnail, also remove recursively if stat is directory
string   root()   Return root folder hash
array|false   scandir()   Return directory content or false on error
array   search()   Search files
false   setError()   Save error message
void   setMimesFilter()   Set mimetypes allowed to display to client
int   size()   Return file size / total directory size
array   stat()   Return fileinfo
int|bool   stripos()   Find position of first occurrence of string in a string with multibyte support
string|false   tmb()   Create thumbnail for required file and return its name of false on failed
string   tmbname()   Return thumbnail file name for required file
array|false   tree()   Return subfolders for required folder or false on error
void   umount()   Some "unmount" stuffs - may be required by virtual fs
mixed   uncrypt()   Return uncrypted path Not implemented
string   uniqueName()   Return new unique name based on file name and suffix
array   updateCache()   Put file stat in cache and return it
array|false   upload()   Save uploaded file.
string   _abspath()   Convert path related to root dir into real path
string|bool   _archive()   Create archive and return its path
string   _basename()   Return file name
void   _checkArchivers()   Detect available archivers
bool   _copy()   Copy file into another file (only inside one volume)
string   _dimensions()   Return object width and height Ususaly used for images, but can be realize for video etc...
string   _dirname()   Return parent directory path
bool   _extract()   Extract files from archive
bool   _fclose()   Close opened file
bool   _filePutContents()   Write a string to a file
resource|false   _fopen()   Open file and return file pointer
string|false   _getContents()   Get file contents
bool   _inpath()   Return true if $path is children of $parent
string   _joinPath()   Join dir name and file name and return full path.
string|bool   _mkdir()   Create dir and return created dir path or false on failed
string|bool   _mkfile()   Create file and return it's path or false on failed
string|bool   _move()   Move file into another parent dir.
string   _normpath()   Return normalized path
string   _path()   Return fake path started from root dir.
string   _relpath()   Return file path related to root dir
bool   _rmdir()   Remove dir
bool|string   _save()   Create new file and write into it from file pointer.
array   _scandir()   Return files list in directory
array|false   _stat()   Return stat for given path.
bool   _subdirs()   Return true if path is dir and has at least one childs directory
bool   _symlink()   Create symlink
bool   _unlink()   Remove file

[ Top ]
Properties
static array   $mimetypes = array(
// applications
'ai' => 'application/postscript',
'eps' => 'application/postscript',
'exe' => 'application/x-executable',
'doc' => 'application/vnd.ms-word',
'xls' => 'application/vnd.ms-excel',
'ppt' => 'application/vnd.ms-powerpoint',
'pps' => 'application/vnd.ms-powerpoint',
'pdf' => 'application/pdf',
'xml' => 'application/xml',
'swf' => 'application/x-shockwave-flash',
'torrent' => 'application/x-bittorrent',
'jar' => 'application/x-jar',
// open office (finfo detect as application/zip)
'odt' => 'application/vnd.oasis.opendocument.text',
'ott' => 'application/vnd.oasis.opendocument.text-template',
'oth' => 'application/vnd.oasis.opendocument.text-web',
'odm' => 'application/vnd.oasis.opendocument.text-master',
'odg' => 'application/vnd.oasis.opendocument.graphics',
'otg' => 'application/vnd.oasis.opendocument.graphics-template',
'odp' => 'application/vnd.oasis.opendocument.presentation',
'otp' => 'application/vnd.oasis.opendocument.presentation-template',
'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
'odc' => 'application/vnd.oasis.opendocument.chart',
'odf' => 'application/vnd.oasis.opendocument.formula',
'odb' => 'application/vnd.oasis.opendocument.database',
'odi' => 'application/vnd.oasis.opendocument.image',
'oxt' => 'application/vnd.openofficeorg.extension',
// MS office 2007 (finfo detect as application/zip)
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template',
'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide',
'sldm' => 'application/vnd.ms-powerpoint.slide.macroEnabled.12',
// archives
'gz' => 'application/x-gzip',
'tgz' => 'application/x-gzip',
'bz' => 'application/x-bzip2',
'bz2' => 'application/x-bzip2',
'tbz' => 'application/x-bzip2',
'zip' => 'application/zip',
'rar' => 'application/x-rar',
'tar' => 'application/x-tar',
'7z' => 'application/x-7z-compressed',
// texts
'txt' => 'text/plain',
'php' => 'text/x-php',
'html' => 'text/html',
'htm' => 'text/html',
'js' => 'text/javascript',
'css' => 'text/css',
'rtf' => 'text/rtf',
'rtfd' => 'text/rtfd',
'py' => 'text/x-python',
'java' => 'text/x-java-source',
'rb' => 'text/x-ruby',
'sh' => 'text/x-shellscript',
'pl' => 'text/x-perl',
'xml' => 'text/xml',
'sql' => 'text/x-sql',
'c' => 'text/x-csrc',
'h' => 'text/x-chdr',
'cpp' => 'text/x-c++src',
'hh' => 'text/x-c++hdr',
'log' => 'text/plain',
'csv' => 'text/x-comma-separated-values',
// images
'bmp' => 'image/x-ms-bmp',
'jpg' => 'image/jpeg',
'jpeg' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
'tif' => 'image/tiff',
'tiff' => 'image/tiff',
'tga' => 'image/x-targa',
'psd' => 'image/vnd.adobe.photoshop',
'ai' => 'image/vnd.adobe.photoshop',
'xbm' => 'image/xbm',
'pxm' => 'image/pxm',
//audio
'mp3' => 'audio/mpeg',
'mid' => 'audio/midi',
'ogg' => 'audio/ogg',
'oga' => 'audio/ogg',
'm4a' => 'audio/x-m4a',
'wav' => 'audio/wav',
'wma' => 'audio/x-ms-wma',
// video
'avi' => 'video/x-msvideo',
'dv' => 'video/x-dv',
'mp4' => 'video/mp4',
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mov' => 'video/quicktime',
'wm' => 'video/x-ms-wmv',
'flv' => 'video/x-flv',
'mkv' => 'video/x-matroska',
'webm' => 'video/webm',
'ogv' => 'video/ogg',
'ogm' => 'video/ogg'
)
[line 323]

default extensions/mimetypes for mimeDetect == 'internal'

API Tags:
Access:  protected


[ Top ]
mixed   $access = null [line 259]

Access control function/class

API Tags:
Access:  protected


[ Top ]
array   $archivers = array(
'create' => array(),'extract'=>array())
[line 115]

Archivers config

API Tags:
Access:  protected


[ Top ]
mixed   $attributes = array() [line 252]

Access control function/class

API Tags:
Access:  protected


[ Top ]
array   $cache = array() [line 467]

Cache storage

API Tags:
Access:  protected


[ Top ]
string   $cryptLib = '' [line 108]

Library to crypt files name

API Tags:
Access:  protected


[ Top ]
array   $defaults = array(
'read' => true,
'write' => true,
'locked' => false,
'hidden' => false
)
[line 240]

Defaults permissions

API Tags:
Access:  protected


[ Top ]
array   $diabled = array() [line 316]

List of disabled client's commands

API Tags:
Access:  protected


[ Top ]
array   $dirsCache = array() [line 474]

Cache by folders

API Tags:
Access:  protected


[ Top ]
string   $driverId = 'a' [line 23]

Driver id Must be started from letter and contains [a-z0-9] Used as part of volume id

API Tags:
Access:  protected


Redefined in descendants as:

[ Top ]
array   $error = array() [line 132]

Errors from last failed action

API Tags:
Access:  protected


[ Top ]
object   $finfo = null [line 309]

Finfo object for mimeDetect == 'finfo'

API Tags:
Access:  protected


[ Top ]
string   $id = '' [line 30]

Volume id - used as prefix for files hashes

API Tags:
Access:  protected


[ Top ]
string   $imgLib = 'auto' [line 101]

Image manipulation lib name auto|imagick|mogtify|gd

API Tags:
Access:  protected


[ Top ]
string   $mimeDetect = 'auto' [line 295]

Mimetype detect method

API Tags:
Access:  protected


[ Top ]
bool   $mounted = false [line 37]

Flag - volume "mounted" and available

API Tags:
Access:  protected


[ Top ]
array   $onlyMimes = array() [line 453]

Mimetypes allowed to display

API Tags:
Access:  protected


[ Top ]
array   $options = array(
'id' => '',
// root directory path
'path' => '',
// open this path on initial request instead of root path
'startPath' => '',
// how many subdirs levels return per request
'treeDeep' => 1,
// root url, not set to disable sending URL to client (replacement for old "fileURL" option)
'URL' => '',
// directory separator. required by client to show paths correctly
'separator' => DIRECTORY_SEPARATOR,
// library to crypt/uncrypt files names (not implemented)
'cryptLib' => '',
// how to detect files mimetypes. (auto/internal/finfo/mime_content_type)
'mimeDetect' => 'auto',
// mime.types file path (for mimeDetect==internal)
'mimefile' => '',
// directory for thumbnails
'tmbPath' => '.tmb',
// mode to create thumbnails dir
'tmbPathMode' => 0777,
// thumbnails dir URL. Set it if store thumbnails outside root directory
'tmbURL' => '',
// thumbnails size (px)
'tmbSize' => 48,
// thumbnails crop (true - crop, false - scale image to fit thumbnail size)
'tmbCrop' => true,
// thumbnails background color (hex #rrggbb or 'transparent')
'tmbBgColor' => '#ffffff',
// image manipulations library
'imgLib' => 'auto',
// on paste file - if true - old file will be replaced with new one, if false new file get name - original_name-number.ext
'copyOverwrite' => true,
// if true - join new and old directories content on paste
'copyJoin' => true,
// on upload - if true - old file will be replaced with new one, if false new file get name - original_name-number.ext
'uploadOverwrite' => true,
// mimetypes allowed to upload
'uploadAllow' => array(),// mimetypes not allowed to upload
'uploadDeny'=>array(),// order to proccess uploadAllow and uploadDeny options
'uploadOrder'=>array('deny','allow'),// maximum upload file size. NOTE - this is size for every uploaded files
'uploadMaxSize'=>0,// files dates format
'dateFormat'=>'j M Y H:i',// files time format
'timeFormat'=>'H:i',// if true - every folder will be check for children folders, otherwise all folders will be marked as having subfolders
'checkSubfolders'=>true,// allow to copy from this volume to other ones?
'copyFrom'=>true,// allow to copy from other volumes to this one?
'copyTo'=>true,// list of commands disabled on this root
'disabled'=>array(),// regexp or function name to validate new file name
'acceptedName'=>'/^[^\.].*/',//<-- DONT touch this! Use constructor options to overwrite it!
// function/class method to control files permissions
'accessControl'=>null,// some data required by access control
'accessControlData'=>null,// default permissions. not set hidden/locked here - take no effect
'defaults'=>array('read'=>true,'write'=>true),// files attributes
'attributes'=>array(),// Allowed archive's mimetypes to create. Leave empty for all available types.
'archiveMimes'=>array(),// Manual config for archivers. See example below. Leave empty for auto detect
'archivers'=>array(),// required to fix bug on macos
'utf8fix'=>false,// й ё Й Ё Ø Å
'utf8patterns'=>array("\u0438\u0306","\u0435\u0308","\u0418\u0306","\u0415\u0308","\u00d8A","\u030a"),'utf8replace'=>array("\u0439","\u0451","\u0419","\u0401","\u00d8","\u00c5"))
[line 153]

Object configuration

API Tags:
Access:  protected


[ Top ]
array   $removed = array() [line 460]

Store files moved or overwrited files info

API Tags:
Access:  protected


[ Top ]
string   $root = '' [line 44]

Root directory path

API Tags:
Access:  protected


[ Top ]
string   $rootName = '' [line 51]

Root basename | alias

API Tags:
Access:  protected


[ Top ]
string   $separator = DIRECTORY_SEPARATOR [line 446]

Directory separator - required by client

API Tags:
Access:  protected


[ Top ]
string   $startPath = '' [line 58]

Default directory to open

API Tags:
Access:  protected


[ Top ]
string   $tmbPath = '' [line 72]

Thumbnails dir path

API Tags:
Access:  protected


[ Top ]
bool   $tmbPathWritable = false [line 79]

Is thumbnails dir writable

API Tags:
Access:  protected


[ Top ]
int   $tmbSize = 48 [line 93]

Thumbnails size in px

API Tags:
Access:  protected


[ Top ]
string   $tmbURL = '' [line 86]

Thumbnails base URL

API Tags:
Access:  protected


[ Top ]
int   $today = 0 [line 139]

Today 24:00 timestamp

API Tags:
Access:  protected


[ Top ]
int   $treeDeep = 1 [line 125]

How many subdirs levels return for tree

API Tags:
Access:  protected


[ Top ]
array   $uploadAllow = array() [line 266]

Mime types allowed to upload

API Tags:
Access:  protected


[ Top ]
array   $uploadDeny = array() [line 273]

Mime types denied to upload

API Tags:
Access:  protected


[ Top ]
int|string   $uploadMaxSize = 0 [line 288]

Maximum allowed upload file size.

Set as number or string with unit - "10M", "500K", "1G"

API Tags:
Access:  protected


[ Top ]
array   $uploadOrder = array() [line 280]

Order to validate uploadAllow and uploadDeny

API Tags:
Access:  protected


[ Top ]
string   $URL = '' [line 65]

Base URL

API Tags:
Access:  protected


[ Top ]
int   $yesterday = 0 [line 146]

Yesterday 24:00 timestamp

API Tags:
Access:  protected


[ Top ]
Methods
static method mimetypeInternalDetect  [line 2258]

  static string mimetypeInternalDetect( string $path  )

Detect file mimetype using "internal" method

Parameters:
string   $path:  file path

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
allowCreate  [line 2026]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
archive  [line 1632]

  void archive( $hashes, $mime  )

Add files to archive

Parameters:
   $hashes: 
   $mime: 

API Tags:
Access:  public


[ Top ]
attr  [line 1983]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
cacheDir  [line 2188]

  void cacheDir( string $path  )

Get stat for folder content and put in cache

Parameters:
string   $path: 

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
canCreateTmb  [line 2676]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
canResize  [line 2693]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
childsByAttr  [line 2347]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
clearcache  [line 2204]

  void clearcache( )

Clean cache


API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
close  [line 1191]

  void close( Resource $fp, string $hash  )

Close file pointer

Parameters:
Resource   $fp:  file pointer
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
closest  [line 995]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
closestByAttr  [line 2320]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
commandDisabled  [line 896]

  bool commandDisabled( string $cmd  )

Return true if command disabled in options

Parameters:
string   $cmd:  command name

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
configure  [line 498]

  void configure( )

Configure after successfull mount.

By default set thumbnails path and image manipulation library.


API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
copy  [line 2461]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
copyFrom  [line 2537]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
copyFromAllowed  [line 939]

  bool copyFromAllowed( )

Return true if copy from this volume allowed


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
countSize  [line 2272]

  int countSize( string $path  )

Return file/total directory size

Parameters:
string   $path:  file path

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
createTmb  [line 2705]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
crypt  [line 1900]

  mixed crypt( string $path  )

Return crypted path Not implemented

Parameters:
string   $path:  path

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
debug  [line 560]

  array debug( )

Return debug info for client


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
decode  [line 1879]

  string decode( string $hash  )

Decode path from hash

Parameters:
string   $hash:  file hash

API Tags:
Access:  protected

Information Tags:
Author:  Troex Nevelin
Author:  Dmitry (dio) Levashov

[ Top ]
defaultPath  [line 862]

  string defaultPath( )

Return root or startPath hash


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
dimensions  [line 1770]

  array dimensions( string $hash  )

Return image dimensions

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
dir  [line 1029]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
doSearch  [line 2417]

  array doSearch( string $path, string $q, array $mimes  )

Recursive files search

Parameters:
string   $path:  dir path
string   $q:  search string
array   $mimes: 

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
driverId  [line 540]

  string driverId( )

Return driver id. Used as a part of volume id.


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
duplicate  [line 1323]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
encode  [line 1849]

  string encode( string $path  )

Encode path into hash

Parameters:
string   $path:  file path

API Tags:
Access:  protected

Information Tags:
Author:  Troex Nevelin
Author:  Dmitry (dio) Levashov

[ Top ]
error  [line 829]

  array error( )

Return error message from last failed action


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
extract  [line 1600]

  array|bool extract( string $hash  )

Extract files from archive

Parameters:
string   $hash:  archive hash

API Tags:
Access:  public

Information Tags:
Author:  Alexey Sukhotin
Author:  Dmitry (dio) Levashov,

[ Top ]
file  [line 1007]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
gdImage  [line 3153]

  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:
Access:  protected


[ Top ]
gdImageBackground  [line 3172]

  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:
Access:  protected


[ Top ]
gdImageCreate  [line 3128]

  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


[ Top ]
getContents  [line 1548]

  string|false getContents( string $hash  )

Return file contents

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
getContentUrl  [line 1787]

  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:
Access:  public

Information Tags:
Author:  Naoki Sawada

[ Top ]
getScandir  [line 2366]

  array getScandir( string $path  )

Return required dir's files info.

If onlyMimes is set - return only dirs and files of required mimes

Parameters:
string   $path:  dir path

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
getTempPath  [line 1800]

  string getTempPath( )

Return temp path


API Tags:
Access:  public

Information Tags:
Author:  Naoki Sawada

[ Top ]
gettmb  [line 2653]

  string|false gettmb( string $path, array $stat  )

Return thumnbnail name if exists

Parameters:
string   $path:  file path
array   $stat:  file stat

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
gettree  [line 2389]

  array gettree( string $path, int $deep, [ $exclude = '']  )

Return subdirs tree

Parameters:
string   $path:  parent dir path
int   $deep:  tree deep
   $exclude: 

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
id  [line 550]

  string id( )

Return volume id


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
imgCrop  [line 2880]

  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:
Access:  protected

Information Tags:
Author:  Alexey Sukhotin
Author:  Dmitry (dio) Levashov

[ Top ]
imgResize  [line 2784]

  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:
Access:  protected

Information Tags:
Author:  Alexey Sukhotin
Author:  Dmitry (dio) Levashov

[ Top ]
imgRotate  [line 3016]

  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:
Access:  protected

Information Tags:
Author:  Troex Nevelin
Author:  nao-pon

[ Top ]
imgSquareFit  [line 2952]

  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:
Access:  protected

Information Tags:
Author:  Alexey Sukhotin
Author:  Dmitry (dio) Levashov

[ Top ]
init  [line 487]

  bool init( )

Prepare driver before mount volume.

Return true if volume is ready.


API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
isReadable  [line 928]

  bool isReadable( )

Return true if voume is readable.


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
isSameType  [line 2306]

  bool isSameType( string $mime1, string $mime2  )

Return true if all mimes is directory or files

Parameters:
string   $mime1:  mimetype
string   $mime2:  mimetype

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
ls  [line 1067]

  array ls( string $hash  )

Return dir files names list

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
mimeAccepted  [line 910]

  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:
Access:  public

Information Tags:
Author:  Troex Nevelin
Author:  Dmitry (dio) Levashov

[ Top ]
mimetype  [line 2215]

  string mimetype( string $path, [ $name = '']  )

Return file mimetype

Parameters:
string   $path:  file path
   $name: 

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
mkdir  [line 1203]

  array|false mkdir( string $dst, string $name  )

Create directory and return dir info

Parameters:
string   $dst:  destination directory
string   $name:  directory name

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
mkfile  [line 1238]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
mount  [line 578]

  bool mount( $opts  )

"Mount" volume.

Return true if volume available for read or write, false - otherwise

Parameters:
array   $opts: 

API Tags:
Access:  public

Information Tags:
Author:  Alexey Sukhotin
Author:  Dmitry (dio) Levashov

[ Top ]
move  [line 2511]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
nameAccepted  [line 1923]

  bool nameAccepted( string $name  )

Validate file name based on $this->options['acceptedName'] regexp

Parameters:
string   $name:  file name

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
open  [line 1174]

  Resource open( string $hash  )

Open file for reading and return file pointer

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
options  [line 872]

  array options( $hash  )

Return volume options required by client:

Parameters:
   $hash: 

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
parents  [line 1112]

  array parents( string $hash  )

Return part of dirs tree from required dir up to root dir

Parameters:
string   $hash:  directory hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
paste  [line 1451]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
path  [line 950]

  string path( string $hash  )

Return file path related to root

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
procExec  [line 3068]

  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:
Author:  Alexey Sukhotin

[ Top ]
putContents  [line 1574]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
realpath  [line 961]

  string realpath( string $hash  )

Return file real path if file exists

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
remove  [line 2596]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
removed  [line 972]

  array removed( )

Return list of moved/overwrited files


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
rename  [line 1273]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
resetRemoved  [line 982]

  void resetRemoved( )

Clean removed files list


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
resize  [line 1687]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov
Author:  Troex Nevelin
Author:  Alexey Sukhotin
Author:  nao-pon

[ Top ]
rm  [line 1745]

  bool rm( string $hash  )

Remove file/dir

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
rmTmb  [line 3108]

  void rmTmb( string $stat  )

Remove thumbnail, also remove recursively if stat is directory

Parameters:
string   $stat:  file stat

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov
Author:  Naoki Sawada
Author:  Troex Nevelin

[ Top ]
root  [line 852]

  string root( )

Return root folder hash


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
scandir  [line 1050]

  array|false scandir( string $hash  )

Return directory content or false on error

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
search  [line 1759]

  array search( string $q, array $mimes  )

Search files

Parameters:
string   $q:  search string
array   $mimes: 

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
setError  [line 1819]

  false setError( array $error  )

Save error message

Parameters:
array   $error:  error

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry(dio) Levashov

[ Top ]
setMimesFilter  [line 840]

  void setMimesFilter( array $mimes  )

Set mimetypes allowed to display to client

Parameters:
array   $mimes: 

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
size  [line 1163]

  int size( string $hash  )

Return file size / total directory size

Parameters:
string   $hash:  file hash

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
stat  [line 2057]

  array stat( string $path  )

Return fileinfo

Parameters:
string   $path:  file cache

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
stripos  [line 3216]

  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:
Access:  protected

Information Tags:
Author:  Alexey Sukhotin

[ Top ]
tmb  [line 1146]

  string|false tmb( $hash  )

Create thumbnail for required file and return its name of false on failed

Parameters:
   $hash: 

API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
tmbname  [line 2641]

  string tmbname( array $stat  )

Return thumbnail file name for required file

Parameters:
array   $stat:  file stat

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
tree  [line 1093]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
umount  [line 820]

  void umount( )

Some "unmount" stuffs - may be required by virtual fs


API Tags:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
uncrypt  [line 1912]

  mixed uncrypt( mixed $hash  )

Return uncrypted path Not implemented

Parameters:
mixed   $hash:  hash

API Tags:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
uniqueName  [line 1943]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
updateCache  [line 2074]

  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:
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
upload  [line 1356]

  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:
Access:  public

Information Tags:
Author:  Dmitry (dio) Levashov

[ Top ]
_abspath  [line 3283]

  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:

[ Top ]
_archive  [line 3509]

  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:

[ Top ]
_basename  [line 3245]

  string _basename( string $path  )

Return file name

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_checkArchivers  [line 3518]

  void _checkArchivers( )

Detect available archivers


API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Alexey Sukhotin
Author:  Dmitry (dio) Levashov,

Redefined in descendants as:

[ Top ]
_copy  [line 3423]

  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:

[ Top ]
_dimensions  [line 3348]

  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:

[ Top ]
_dirname  [line 3236]

  string _dirname( string $path  )

Return parent directory path

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_extract  [line 3496]

  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:

[ Top ]
_fclose  [line 3379]

  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:

[ Top ]
_filePutContents  [line 3485]

  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:

[ Top ]
_fopen  [line 3369]

  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:

[ Top ]
_getContents  [line 3475]

  string|false _getContents( string $path  )

Get file contents

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_inpath  [line 3303]

  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:

[ Top ]
_joinPath  [line 3256]

  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:

[ Top ]
_mkdir  [line 3391]

  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:

[ Top ]
_mkfile  [line 3401]

  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:

[ Top ]
_move  [line 3435]

  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:

[ Top ]
_normpath  [line 3265]

  string _normpath( string $path  )

Return normalized path

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_path  [line 3293]

  string _path( string $path  )

Return fake path started from root dir.

Required to show path on client side.

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_relpath  [line 3274]

  string _relpath( string $path  )

Return file path related to root dir

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_rmdir  [line 3453]

  bool _rmdir( string $path  )

Remove dir

Parameters:
string   $path:  dir path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_save  [line 3466]

  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:

[ Top ]
_scandir  [line 3359]

  array _scandir( string $path  )

Return files list in directory

Parameters:
string   $path:  dir path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_stat  [line 3324]

  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:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_subdirs  [line 3337]

  bool _subdirs( string $path  )

Return true if path is dir and has at least one childs directory

Parameters:
string   $path:  dir path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]
_symlink  [line 3412]

  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:

[ Top ]
_unlink  [line 3444]

  bool _unlink( string $path  )

Remove file

Parameters:
string   $path:  file path

API Tags:
Abstract:  
Access:  protected

Information Tags:
Author:  Dmitry (dio) Levashov

Redefined in descendants as:

[ Top ]

Documentation generated on Sat, 07 Jun 2014 18:03:25 +0200 by phpDocumentor 1.4.3