Interface MOXMAN_Vfs_IFile

Implemented byMOXMAN_AmazonS3_File, MOXMAN_Azure_File, MOXMAN_Favorites_File, MOXMAN_Ftp_File, MOXMAN_History_File, MOXMAN_Uploaded_File, MOXMAN_Vfs_BaseFile, MOXMAN_Vfs_Cache_File, MOXMAN_Vfs_Local_File, MOXMAN_Vfs_Memory_File

This interface is to be implemented by any file instance class.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
canRead() Returns true if the files is readable. MOXMAN_Vfs_IFile
canWrite() Returns true if the files is writable. MOXMAN_Vfs_IFile
copyTo() Copies this file to the specified file instance. MOXMAN_Vfs_IFile
delete() Deletes the file. MOXMAN_Vfs_IFile
exists() Returns true if the file exists. MOXMAN_Vfs_IFile
exportTo() Exports the file to the local system, for example a file from a zip or db file system. MOXMAN_Vfs_IFile
getConfig() Returns a config instance for the current file or null if it's not available. MOXMAN_Vfs_IFile
getFileSystem() Returns the file system that created the file. MOXMAN_Vfs_IFile
getLastModified() Returns last modification date in ms as an long. MOXMAN_Vfs_IFile
getMetaData() Returns a meta data instance for the current file. MOXMAN_Vfs_IFile
getName() Returns the file name of a file. MOXMAN_Vfs_IFile
getParent() Returns the parent files absolute path. MOXMAN_Vfs_IFile
getParentFile() Returns the parent files MOXMAN_Vfs_IFile instance. MOXMAN_Vfs_IFile
getPath() Returns the absolute path of the file. MOXMAN_Vfs_IFile
getPublicLinkPath() Returns the public path of a file that this file points to. MOXMAN_Vfs_IFile
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_IFile
getSize() Returns file size as an long. MOXMAN_Vfs_IFile
getUrl() Returns the absolute public URL for the file. MOXMAN_Vfs_IFile
importFrom() Imports a local file to the file system, for example when users upload files. MOXMAN_Vfs_IFile
isDirectory() Returns true if the file is a directory. MOXMAN_Vfs_IFile
isFile() Returns true if the file is a file. MOXMAN_Vfs_IFile
isHidden() Returns true if the file is hidden. MOXMAN_Vfs_IFile
listFiles() Returns an array of MOXMAN_Vfs_IFile instances. MOXMAN_Vfs_IFile
listFilesFiltered() Returns an array of MOXMAN_Vfs_IFile instances based on the specified filter instance. MOXMAN_Vfs_IFile
mkdir() Creates a new directory. MOXMAN_Vfs_IFile
moveTo() Moves this file to the specified file instance. MOXMAN_Vfs_IFile
open() Opens a file stream by the specified mode. The default mode is rb. MOXMAN_Vfs_IFile

Method Details

canRead() public abstract method

Returns true if the files is readable.

public abstract boolean canRead ( )
return boolean

True if the files is readable.

canWrite() public abstract method

Returns true if the files is writable.

public abstract boolean canWrite ( )
return boolean

True if the files is writable.

copyTo() public abstract method

Copies this file to the specified file instance.

public abstract void copyTo ( MOXMAN_Vfs_IFile $dest )
$dest MOXMAN_Vfs_IFile

File to copy to.

delete() public abstract method

Deletes the file.

public abstract void delete ( $deep false )
$deep boolean

If this option is enabled files will be deleted recurive.

exists() public abstract method

Returns true if the file exists.

public abstract boolean exists ( )
return boolean

True if the file exists.

exportTo() public abstract method

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 abstract void exportTo ( $localPath )
$localPath string

Absolute path to local file.

getConfig() public abstract method

Returns a config instance for the current file or null if it's not available.

public abstract MOXMAN_Util_Config getConfig ( )
return MOXMAN_Util_Config

Config instance for the file.

getFileSystem() public abstract method

Returns the file system that created the file.

public abstract \MOXMAN_FileSystem getFileSystem ( )
return \MOXMAN_FileSystem

File system instance that created the file.

getLastModified() public abstract method

Returns last modification date in ms as an long.

public abstract \long getLastModified ( )
return \long

Last modification date in ms as an long.

getMetaData() public abstract method

Returns a meta data instance for the current file.

public abstract MOXMAN_Vfs_FileMetaData getMetaData ( )
return MOXMAN_Vfs_FileMetaData

Meta data instance for the file.

getName() public abstract method

Returns the file name of a file.

public abstract string getName ( )
return string

File name of file.

getParent() public abstract method

Returns the parent files absolute path.

public abstract String getParent ( )
return String

Parent files absolute path.

getParentFile() public abstract method

Returns the parent files MOXMAN_Vfs_IFile instance.

public abstract MOXMAN_Vfs_IFile getParentFile ( )
return MOXMAN_Vfs_IFile

Parent file instance or false if there is no more parents.

getPath() public abstract method

Returns the absolute path of the file.

public abstract String getPath ( )
return String

Absolute path of the file.

getPublicLinkPath() public abstract method

Returns the public path of a file that this file points to.

public abstract String getPublicLinkPath ( )
return String

Public link path or empty string if it doesn't have a link.

getPublicPath() public abstract method

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.

public abstract String getPublicPath ( )
return String

Public path for the file to be passed out to the client.

getSize() public abstract method

Returns file size as an long.

public abstract \long getSize ( )
return \long

File size as an long.

getUrl() public abstract method

Returns the absolute public URL for the file.

public abstract String getUrl ( )
return String

Absolute public URL for the file.

importFrom() public abstract method

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 abstract void importFrom ( $localPath )
$localPath string

Absolute path to local file.

isDirectory() public abstract method

Returns true if the file is a directory.

public abstract boolean isDirectory ( )
return boolean

True if the file is a directory.

isFile() public abstract method

Returns true if the file is a file.

public abstract boolean isFile ( )
return boolean

True if the file is a file.

isHidden() public abstract method

Returns true if the file is hidden.

public abstract boolean isHidden ( )
return boolean

True if the file is a hidden file.

listFiles() public abstract method

Returns an array of MOXMAN_Vfs_IFile instances.

public abstract MOXMAN_Vfs_FileList listFiles ( )
return MOXMAN_Vfs_FileList

List of MOXMAN_Vfs_IFile instances.

listFilesFiltered() public abstract method

Returns an array of MOXMAN_Vfs_IFile instances based on the specified filter instance.

public abstract MOXMAN_Vfs_FileList listFilesFiltered ( MOXMAN_Vfs_IFileFilter $filter )
$filter MOXMAN_Vfs_IFileFilter

MOXMAN_Vfs_IFileFilter instance to filter files by.

return MOXMAN_Vfs_FileList

List of MOXMAN_Vfs_IFile instances.

mkdir() public abstract method

Creates a new directory.

public abstract void mkdir ( )
moveTo() public abstract method

Moves this file to the specified file instance.

public abstract void moveTo ( MOXMAN_Vfs_IFile $dest )
$dest MOXMAN_Vfs_IFile

File to rename/move to.

open() public abstract method

Opens a file stream by the specified mode. The default mode is rb.

public abstract MOXMAN_Vfs_IFileStream open ( $mode = \MOXMAN_Vfs_IFileStream::READ )
$mode string

Mode to open file by, r, rb, w, wb etc.

return MOXMAN_Vfs_IFileStream

File stream implementation for the file system.