Property | Type | Description | |
---|---|---|---|
$_credentials | array | List of additional credentials required for this VFS backend (example: For FTP, we need a username and password to log in to the server with). | |
$_features | array | List of features that the VFS driver supports. | |
$_params | array | Hash containing connection parameters. | |
$_permissions | array | List of permissions and if they can be changed in this VFS backend. | |
$_vfsSize | integer | The current size, in bytes, of the VFS tree. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
autocreatePath ( string $path ) | Automatically creates any necessary parent directories in the specified $path. | |
changePermissions ( string $path, string $name, string $permission ) | Changes permissions for an item on the VFS. | |
checkCredentials ( ) | Checks the credentials that we have by calling _connect(), to see if there is a valid login. | |
copy ( string $path, string $name, string $dest, boolean $autocreate = false ) | Copies a file through the backend. | |
createFolder ( string $path, string $name ) | Creates a folder in the VFS. | |
delete ( $path, $name ) | Alias to deleteFile() | |
deleteFile ( string $path, string $name ) | Deletes a file from the VFS. | |
deleteFolder ( string $path, string $name, boolean $recursive = false ) | Deletes a folder from the VFS. | |
emptyFolder ( string $path ) | Recursively remove all files and subfolders from the given folder. | |
exists ( string $path, string $name ) : boolean | Returns if a given file or folder exists in a folder. | |
getCurrentDirectory ( ) : string | Returns the current working directory of the VFS backend. | |
getFolderSize ( string $path = null ) : integer | Returns the size of a folder. | |
getModifiablePermissions ( ) : array | Returns an array specifying what permissions are changeable for this VFS implementation. | |
getParam ( string $name ) : mixed | Returns configuration parameters. | |
getQuota ( ) : mixed | Get quota information (used/allocated), in bytes. | |
getRequiredCredentials ( ) : array | Returns the list of additional credentials required, if any. | |
getVFSSize ( ) : integer | Returns the size of the VFS item. | |
hasFeature ( string $feature ) : boolean | Returns whether the drivers supports a certain feature. | |
isFolder ( string $path, string $name ) : boolean | Checks if a given item is a folder. | |
listFolder ( string $path, string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false, boolean $recursive = false ) : array | Returns a file list of the directory passed in. | |
move ( string $path, string $name, string $dest, boolean $autocreate = false ) | Moves a file through the backend. | |
read ( string $path, string $name ) : string | Retrieves a file from the VFS. | |
readByteRange ( string $path, string $name, integer &$offset, integer $length, integer &$remaining ) : string | Retrieves a part of a file from the VFS. Particularly useful when reading large files which would exceed the PHP memory limits if they were stored in a string. | |
readFile ( string $path, string $name ) : string | Retrieves a file from the VFS as an on-disk local file. | |
rename ( string $oldpath, string $oldname, string $newpath, string $newname ) | Renames a file in the VFS. | |
setParams ( array $params = [] ) | Sets configuration parameters. | |
setQuota ( integer $quota, integer $metric = Horde_Vfs::QUOTA_METRIC_BYTE ) | Sets the VFS quota limit. | |
setQuotaRoot ( string $dir ) | Sets the VFS quota root. | |
size ( string $path, string $name ) : integer | Retrieves the size of a file from the VFS. | |
write ( string $path, string $name, string $tmpFile, boolean $autocreate = false ) | Stores a file in the VFS. | |
writeData ( string $path, string $name, string $data, boolean $autocreate = false ) | Stores a file in the VFS from raw data. |
Method | Description | |
---|---|---|
_checkDestination ( string $path, string $dest ) | Checks whether a source and destination directory are the same. | |
_checkQuotaDelete ( string $path, string $name ) | Checks the quota when preparing to delete data. | |
_checkQuotaWrite ( string $mode, string $data, string $path = null, string $name = null ) | Checks the quota when preparing to write data. | |
_connect ( ) | TODO | |
_copyRecursive ( string $path, string $name, string $dest ) | Recursively copies a directory through the backend. | |
_filterMatch ( string | array $filter, string $filename ) : boolean | Returns whether or not a file or directory name matches an filter element. | |
_getPath ( string $path, string $name ) : mixed | Returns the full path of an item. | |
_listFolder ( string $path, string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array | Returns an an unsorted file list of the specified directory. |
public __construct ( array $params = [] ) | ||
$params | array | A hash containing connection parameters. |
protected _checkDestination ( string $path, string $dest ) | ||
$path | string | A source path. |
$dest | string | A destination path. |
protected _checkQuotaDelete ( string $path, string $name ) | ||
$path | string | The path the file is located in. |
$name | string | The filename. |
protected _checkQuotaWrite ( string $mode, string $data, string $path = null, string $name = null ) | ||
$mode | string | Either 'string' or 'file'. If 'string', $data is the data to be written. If 'file', $data is the filename containing the data to be written. |
$data | string | Either the data or the filename to the data. |
$path | string | The path the file is located in. |
$name | string | The filename. |
protected _listFolder ( string $path, string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array | ||
$path | string | The path of the directory. |
$filter | string | array | Regular expression(s) to filter file/directory name on. |
$dotfiles | boolean | Show dotfiles? |
$dironly | boolean | Show only directories? |
return | array | File list. |
public autocreatePath ( string $path ) | ||
$path | string | The VFS path to autocreate. |
public checkCredentials ( ) |
public createFolder ( string $path, string $name ) | ||
$path | string | The parent folder. |
$name | string | The name of the new folder. |
public deleteFile ( string $path, string $name ) | ||
$path | string | The path to delete the file from. |
$name | string | The filename to delete. |
public emptyFolder ( string $path ) | ||
$path | string | The path of the folder to empty. |
public getCurrentDirectory ( ) : string | ||
return | string | The current working directory. |
public getFolderSize ( string $path = null ) : integer | ||
$path | string | The path of the folder. |
return | integer | The size of the folder, in bytes. |
public getModifiablePermissions ( ) : array | ||
return | array | Changeable permisions. |
public getRequiredCredentials ( ) : array | ||
return | array | Credential list. |
public getVFSSize ( ) : integer | ||
return | integer | The size, in bytes, of the VFS item. |
public hasFeature ( string $feature ) : boolean | ||
$feature | string | A feature name. See {@link $_features} for a list of possible features. |
return | boolean | True if the feature is supported. |
public listFolder ( string $path, string | array $filter = null, boolean $dotfiles = true, boolean $dironly = false, boolean $recursive = false ) : array | ||
$path | string | The path of the directory. |
$filter | string | array | Regular expression(s) to filter file/directory name on. |
$dotfiles | boolean | Show dotfiles? |
$dironly | boolean | Show only directories? |
$recursive | boolean | Return all directory levels recursively? |
return | array | File list. |
public readByteRange ( string $path, string $name, integer &$offset, integer $length, integer &$remaining ) : string | ||
$path | string | The pathname to the file. |
$name | string | The filename to retrieve. |
$offset | integer | The offset of the part. (The new offset will be stored in here). |
$length | integer | The length of the part. If the length = -1, the whole part after the offset is retrieved. If more bytes are given as exists after the given offset. Only the available bytes are read. |
$remaining | integer | The bytes that are left, after the part that is retrieved. |
return | string | The file data. |
public setQuotaRoot ( string $dir ) | ||
$dir | string | The root directory for the quota determination. |
protected array $_credentials | ||
return | array |
protected array $_features | ||
return | array |
protected array $_params | ||
return | array |
protected array $_permissions | ||
return | array |
protected int $_vfsSize | ||
return | integer |