Свойство | Тип | Описание | |
---|---|---|---|
$_credentials | array | List of additional credentials required for this VFS backend. | |
$_prefix | string | Passed as a path suffix to the share parameter. | |
$_rootCreated | boolean | Has the vfsroot already been created? |
Метод | Описание | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
copy ( string $path, string $name, string $dest, boolean $autocreate = false ) | Copies a file through the backend. | |
createFolder ( string $path, string $name ) | Creates a folder on the VFS. | |
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. | |
isFolder ( string $path, string $name ) : boolean | Checks if a given pathname 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. | |
parseListing ( $res, $filter, $dotfiles, $dironly ) | ||
read ( string $path, string $name ) : string | Retrieves a file from the VFS. | |
readFile ( string $path, string $name ) : string | Retrieves a file from the VFS as an on-disk local file. | |
readStream ( string $path, string $name ) : resource | Open a stream to a file in the VFS. | |
rename ( string $oldpath, string $oldname, string $newpath, string $newname ) | Renames a file in the VFS. | |
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. |
Метод | Описание | |
---|---|---|
_command ( array $path, array $cmd ) : array | Executes SMB commands - without authentication - and returns output lines in array. | |
_connect ( ) | Authenticates a user on the SMB server and share. | |
_createRoot ( ) | Creates the vfsroot. | |
_escapeShellCommand ( ) : array | Replacement for escapeshellcmd(), variable length args, as we only want certain characters escaped. | |
_execute ( string $cmd ) : array | Executes a command and returns output lines in array. | |
_getNativePath ( string $path ) : string | Returns the full path of a directory. |
public __construct ( array $params = [] ) | ||
$params | array | A hash containing connection parameters. |
protected _connect ( ) |
protected _escapeShellCommand ( ) : array | ||
Результат | array | TODO |
protected _getNativePath ( string $path ) : string | ||
$path | string | The directory. |
Результат | string | Full path to the directory. |
public createFolder ( string $path, string $name ) | ||
$path | string | The path of directory to create 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 use. |
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? |
Результат | array | File list. |
public readStream ( string $path, string $name ) : resource | ||
$path | string | The pathname to the file. |
$name | string | The filename to retrieve. |
Результат | resource | The stream. |
protected array $_credentials | ||
Результат | array |
protected string $_prefix | ||
Результат | string |
protected bool $_rootCreated | ||
Результат | boolean |