Свойство | Тип | Описание | |
---|---|---|---|
$_files | MongoGridFS | The MongoDB GridFS object for the VFS data. | |
$_folders | MongoGridCollection | The MongoDB collection for the VFS folder data. |
Метод | Описание | |
---|---|---|
__construct ( array $params = [] ) | Constructor. | |
createFolder ( $path, $name ) | ||
deleteFile ( $path, $name ) | ||
deleteFolder ( $path, $name, $recursive = false ) | ||
emptyFolder ( $path ) | ||
gc ( $path, $secs = 345600 ) | ||
getFolderSize ( $path = null ) | ||
isFolder ( $path, $name ) | ||
read ( $path, $name ) | ||
readByteRange ( $path, $name, &$offset, $length, &$remaining ) | ||
readStream ( string $path, string $name ) : resource | Open a read-only stream to a file in the VFS. | |
rename ( $oldpath, $oldname, $newpath, $newname ) | ||
size ( $path, $name ) | ||
write ( $path, $name, $tmpFile, $autocreate = false ) | ||
writeData ( $path, $name, $data, $autocreate = false ) |
Метод | Описание | |
---|---|---|
_convertPath ( string $path ) : string | Converts the path name from regular filesystem form to the internal format needed to access the file in the database. | |
_getFile ( $path, $name ) | ||
_isFolder ( $path ) | ||
_listFolder ( string $path, mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array | Returns an an unsorted file list of the specified directory. | |
_mdKey ( $key ) | ||
_write ( $type, $path, $name, $data, $autocreate ) |
public __construct ( array $params = [] ) | ||
$params | array | Additional parameters:
- collection: (string) The collection name for the folders data. - gridfs: (string) The GridFS name. - mongo_db: [REQUIRED] (Horde_Mongo_Client) A MongoDB client object. |
protected _convertPath ( string $path ) : string | ||
$path | string | A VFS path. |
Результат | string | The path with any surrouding slashes stripped off. |
protected _listFolder ( string $path, mixed $filter = null, boolean $dotfiles = true, boolean $dironly = false ) : array | ||
$path | string | The path of the directory. |
$filter | mixed | String/hash to filter file/dirname on. |
$dotfiles | boolean | Show dotfiles? |
$dironly | boolean | Show only directories? |
Результат | array | File list. |
public readByteRange ( $path, $name, &$offset, $length, &$remaining ) |
public readStream ( string $path, string $name ) : resource | ||
$path | string | The pathname to the file. |
$name | string | The filename to retrieve. |
Результат | resource | The stream. |
protected MongoGridFS $_files | ||
Результат | MongoGridFS |