Class: VFS
Source Location: /VFS-0.3.0/lib/VFS.php
VFS API for abstracted file storage and access.
Author(s):
|
|
Child classes:
|
Inherited Variables
|
Inherited Methods
|
Class Details
Method Detail
VFS (Constructor) [line 80]
VFS VFS(
[array
$params = array()])
|
|
Constructor.
Parameters:
autocreatePath [line 540]
void autocreatePath(
string
$path)
|
|
Automatically creates any necessary parent directories in the specified $path.
Parameters:
changePermissions [line 741]
checkCredentials [line 101]
mixed checkCredentials(
)
|
|
Checks the credentials that we have by calling _connect(), to see if there is a valid login.
copy [line 405]
createFolder [line 529]
delete [line 464]
void delete(
$path,
$name)
|
|
Alias to deleteFile()
Parameters:
deleteFile [line 479]
deleteFolder [line 590]
emptyFolder [line 603]
mixed emptyFolder(
string
$path)
|
|
Recursively remove all files and subfolders from the given folder.
Overridden in child classes as:
- VFS_kolab::emptyFolder()
- Recursively remove all files and subfolders from the given folder.
Parameters:
exists [line 509]
boolean exists(
string
$path, string
$name)
|
|
Returns if a given file or folder exists in a folder.
Overridden in child classes as:
- VFS_file::exists()
- Returns if a given file or folder exists in a folder.
Parameters:
factory [line 1056]
VFS &factory(
mixed
$driver, [array
$params = array()])
|
|
Attempts to return a concrete VFS instance based on $driver.
Parameters:
getCurrentDirectory [line 682]
getFolderSize [line 207]
integer getFolderSize(
[string
$path = null], [string
$name = null])
|
|
Returns the size of a folder
Overridden in child classes as:
- VFS_sql::getFolderSize()
- Returns the size of a file.
Parameters:
getModifiablePermissions [line 779]
array getModifiablePermissions(
)
|
|
Returns an array specifying what permissions are changeable for this VFS implementation.
getParam [line 125]
mixed getParam(
string
$name)
|
|
Returns configuration parameters.
Parameters:
getQuota [line 888]
Get quota information (used/allocated), in bytes.
getRequiredCredentials [line 768]
array getRequiredCredentials(
)
|
|
Returns the list of additional credentials required, if any.
getVFSSize [line 831]
Returns the size of the VFS item.
isFolder [line 573]
listFolder [line 642]
array listFolder(
string
$path, [mixed
$filter = null], [boolean
$dotfiles = true], [boolean
$dironly = false], [boolean
$recursive = false])
|
|
Returns a file list of the directory passed in.
Overridden in child classes as:
- VFS_smb::listFolder()
- Returns an unsorted file list.
Parameters:
listFolders [line 758]
log [line 137]
void log(
mixed
$message, [integer
$priority = PEAR_LOG_ERR])
|
|
Logs a message if a PEAR Log object is available, and the message's priority is lower than or equal to the configured log level.
Parameters:
move [line 387]
mixed move(
string
$path, string
$name, string
$dest, [boolean
$autocreate = false])
|
|
Moves a file through the backend.
Overridden in child classes as:
- VFS_smb::move()
- Moves a file through the backend.
- VFS_ftp::move()
- Moves a file through the backend.
- VFS_file::move()
- Moves a file in the database and the file system.
- VFS_sql_file::move()
- Moves a file in the database and the file system.
- VFS_ssh2::move()
- Moves a file through the backend.
- VFS_horde::move()
- Moves a file through the backend.
Parameters:
read [line 237]
readByteRange [line 337]
string readByteRange(
string
$path, string
$name,
&$offset, [integer
$length = -1],
&$remaining, integer
$offset, integer
$remaining)
|
|
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.
Overridden in child classes as:
- VFS_file::readByteRange()
- 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.
- VFS_sql::readByteRange()
- 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.
Parameters:
readFile [line 254]
string readFile(
string
$path, string
$name)
|
|
Retrieves a file from the VFS as an on-disk local file. This function provides a file on local disk with the data of a VFS file in it. This file <em>cannot</em> be modified! The behavior if you do modify it is undefined. It will be removed at the end of the request.
Overridden in child classes as:
- VFS_smb::readFile()
- Retrieves a file from the VFS as an on-disk local file.
- VFS_ftp::readFile()
- Retrieves a file from the VFS as an on-disk local file.
- VFS_file::readFile()
- Retrieves a file from the VFS as an on-disk local file.
- VFS_ssh2::readFile()
- Retrieves a file from the VFS as an on-disk local file.
Parameters:
rename [line 496]
setLogger [line 169]
void setLogger(
Log
&$logger, [
$logLevel = null])
|
|
Sets the PEAR Log object used to log informational or error messages.
Parameters:
setParams [line 111]
void setParams(
[array
$params = array()])
|
|
Sets configuration parameters.
Parameters:
setQuota [line 847]
void setQuota(
integer
$quota, [integer
$metric = VFS_QUOTA_METRIC_BYTE])
|
|
Sets the VFS quota limit.
Parameters:
setQuotaRoot [line 873]
void setQuotaRoot(
string
$dir)
|
|
Sets the VFS quota root.
Parameters:
singleton [line 1091]
VFS &singleton(
mixed
$driver, [array
$params = array()])
|
|
Attempts to return a reference to a concrete VFS instance based on $driver. It will only create a new instance if no VFS instance with the same parameters currently exists. This should be used if multiple types of file backends (and, thus, multiple VFS instances) are required. This method must be invoked as: $var = &VFS::singleton()
Parameters:
size [line 191]
strlen [line 810]
string strlen(
string
$string, [string
$charset = null])
|
|
Returns the character (not byte) length of a string.
Parameters:
strtolower [line 792]
string strtolower(
string
$string)
|
|
Converts a string to all lowercase characters ignoring the current locale.
Parameters:
write [line 355]
writeData [line 372]
_copyRecursive [line 441]
void _copyRecursive(
string
$path, string
$name, string
$dest)
|
|
Recursively copies a directory through the backend.
Parameters:
_getPath [line 1031]
mixed _getPath(
string
$path, string
$name)
|
|
Returns the full path of an item.
Parameters:
_getTempDir [line 910]
Determines the location of the system temporary directory.
_getTempFile [line 945]
Creates a temporary file.
Documentation generated on Mon, 11 Mar 2019 15:34:57 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|