Class MOXMAN_Azure_File
| Inheritance | MOXMAN_Azure_File » MOXMAN_Vfs_BaseFile |
|---|---|
| Implements | MOXMAN_Vfs_IFile |
This is a Azure implementation of the MOXMAN_Vfs_IFile.
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $config | MOXMAN_Util_Config | MOXMAN_Vfs_BaseFile | |
| $fileSystem | MOXMAN_Vfs_FileSystem | MOXMAN_Vfs_BaseFile | |
| $meta | MOXMAN_Vfs_FileMetaData | MOXMAN_Vfs_BaseFile | |
| $path | string | MOXMAN_Vfs_BaseFile | |
| $publicPath | \[type] | MOXMAN_Vfs_BaseFile | |
| $url | string | MOXMAN_Vfs_BaseFile |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Constructs a new file instance. | MOXMAN_Azure_File |
| canRead() | Returns true if the files is readable. | MOXMAN_Vfs_BaseFile |
| canWrite() | Returns true if the files is writable. | MOXMAN_Vfs_BaseFile |
| copyTo() | Copies this file to the specified file instance. | MOXMAN_Azure_File |
| delete() | Deletes the file. | MOXMAN_Azure_File |
| exists() | Returns true if the file exists. | MOXMAN_Azure_File |
| exportTo() | Exports the file to the local system, for example a file from a zip or db file system. | MOXMAN_Azure_File |
| getConfig() | Returns a config instance for the current file. The config is provided by the FileConfigProvider specified for the file system. | MOXMAN_Vfs_BaseFile |
| getFileSystem() | Returns the file system that created the file. | MOXMAN_Vfs_BaseFile |
| getInternalPath() | Returns the file system internal path. This is used when oding requests on the remote server. | MOXMAN_Azure_File |
| getLastModified() | Returns last modification date in ms as an long. | MOXMAN_Azure_File |
| getMetaData() | Returns a meta data instance for the current file. | MOXMAN_Vfs_BaseFile |
| getName() | Returns the file name of a file. | MOXMAN_Vfs_BaseFile |
| getParent() | Returns the parent files absolute path or an empty string if there is no parent. | MOXMAN_Vfs_BaseFile |
| getParentFile() | Returns the parent files File instance. | MOXMAN_Vfs_BaseFile |
| getPath() | Returns the absolute path of the file. | MOXMAN_Vfs_BaseFile |
| getPublicLinkPath() | Returns the public path of a file that this file points to. | MOXMAN_Vfs_BaseFile |
| getPublicPath() | Returns the public path for a file. A public path is a path that is safe to pass to the client side since it doesn't show the systems full path. | MOXMAN_Vfs_BaseFile |
| getSize() | Returns file size as an long. | MOXMAN_Azure_File |
| getStatItem() | Returns a stat item or the default value if it wasn't found. | MOXMAN_Azure_File |
| getUrl() | Returns the absolute public URL for the file. | MOXMAN_Azure_File |
| importFrom() | Imports a local file to the file system, for example when users upload files. | MOXMAN_Azure_File |
| isDirectory() | Returns true if the file is a directory. | MOXMAN_Vfs_BaseFile |
| isFile() | Returns true if the file is a file. | MOXMAN_Azure_File |
| isHidden() | Returns true if the file is hidden. | MOXMAN_Vfs_BaseFile |
| listFiles() | Returns an array of File instances. | MOXMAN_Vfs_BaseFile |
| listFilesFiltered() | Returns an array of MCE_File instances based on the specified filter instance. | MOXMAN_Azure_File |
| mkdir() | Creates a new directory. | MOXMAN_Azure_File |
| moveTo() | Moves this file to the specified file instance. | MOXMAN_Azure_File |
| open() | Opens a file stream by the specified mode. The default mode is rb. | MOXMAN_Azure_File |
Method Details
Constructs a new file instance.
| public void __construct ( MOXMAN_Vfs_FileSystem $fileSystem, $path, $stat = null ) | ||
| $fileSystem | MOXMAN_Vfs_FileSystem | File system instance for the file. |
| $path | String | Path for the file. |
| $stat | Array | File stat info or null. |
Copies this file to the specified file instance.
| public void copyTo ( MOXMAN_Vfs_IFile $dest ) | ||
| $dest | \MCE_File | File to copy to. |
Deletes the file.
| public void delete ( $deep = false ) | ||
| $deep | boolean | If this option is enabled files will be deleted recurive. |
Returns true if the file exists.
| public boolean exists ( ) | ||
| return | boolean | True if the file exists. |
|---|---|---|
Exports the file to the local system, for example a file from a zip or db file system.
Implementations of this method should also support directory recursive exporting.
| public void exportTo ( $localPath ) | ||
| $localPath | String | Absolute path to local file. |
Returns the file system internal path. This is used when oding requests on the remote server.
| public String getInternalPath ( $path = null ) | ||
| $path | String | Optional path to convert into internal an internal path. |
| return | String | Internal file system path. |
|---|---|---|
Returns last modification date in ms as an long.
| public \long getLastModified ( ) | ||
| return | \long | Last modification date in ms as an long. |
|---|---|---|
Returns file size as an long.
| public \long getSize ( ) | ||
| return | \long | File size as an long. |
|---|---|---|
Returns a stat item or the default value if it wasn't found.
| public mixed getStatItem ( $key, $default = false ) | ||
| $key | String | Key of stat item to get. |
| $default | mixed | Default value to return. |
| return | mixed | Value of stat item or default. |
|---|---|---|
Returns the absolute public URL for the file.
| public String getUrl ( ) | ||
| return | String | Absolute public URL for the file. |
|---|---|---|
Imports a local file to the file system, for example when users upload files.
Implementations of this method should also support directory recursive importing.
| public void importFrom ( $localPath ) | ||
| $localPath | String | Absolute path to local file. |
Returns true if the file is a file.
| public boolean isFile ( ) | ||
| return | boolean | True if the file is a file. |
|---|---|---|
Returns an array of MCE_File instances based on the specified filter instance.
| public Array listFilesFiltered ( MOXMAN_Vfs_IFileFilter $filter ) | ||
| $filter | \MCE_FileFilter | MCE_FileFilter instance to filter files by. |
| return | Array | Array of MCE_File instances based on the specified filter instance. |
|---|---|---|
Creates a new directory.
| public void mkdir ( ) |
Moves this file to the specified file instance.
| public void moveTo ( MOXMAN_Vfs_IFile $dest ) | ||
| $dest | \MCE_File | File to rename/move to. |
Opens a file stream by the specified mode. The default mode is rb.
| public MOXMAN_Vfs_IFileStream open ( $mode = \MOXMAN_Vfs_IStream::READ ) | ||
| $mode | String | Mode to open file by, r, rb, w, wb etc. |
| return | MOXMAN_Vfs_IFileStream | File stream implementation for the file system. |
|---|---|---|