Abstract Class MOXMAN_Vfs_BaseFile

InheritanceMOXMAN_Vfs_BaseFile
ImplementsMOXMAN_Vfs_IFile
SubclassesMOXMAN_AmazonS3_File, MOXMAN_Azure_File, MOXMAN_Favorites_File, MOXMAN_Ftp_File, MOXMAN_History_File, MOXMAN_Uploaded_File, MOXMAN_Vfs_Local_File, MOXMAN_Vfs_Memory_File

Abstract BaseFile implementation this can be used by other file systems to get basic functionallity for the file implementation.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates a new absolute file. MOXMAN_Vfs_BaseFile
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_Vfs_BaseFile
delete() Deletes the file. MOXMAN_Vfs_BaseFile
exists() Returns true if the file exists. MOXMAN_Vfs_BaseFile
exportTo() Exports the current file to the specified local path. MOXMAN_Vfs_BaseFile
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
getLastModified() Returns last modification date in ms as an long. MOXMAN_Vfs_BaseFile
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_Vfs_BaseFile
getUrl() Returns the public URL for the file. MOXMAN_Vfs_BaseFile
importFrom() Imports the specified local file to the current file instance. MOXMAN_Vfs_BaseFile
isDirectory() Returns true if the file is a directory. MOXMAN_Vfs_BaseFile
isFile() Returns true if the file is a file. MOXMAN_Vfs_BaseFile
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 MOXMAN_Vfs_IFile instances based on the specified filter instance. MOXMAN_Vfs_BaseFile
mkdir() Creates a new directory. MOXMAN_Vfs_BaseFile
moveTo() Renames/Moves this file to the specified file instance. MOXMAN_Vfs_BaseFile
open() Opens a file stream by the specified mode. The default mode is rb. MOXMAN_Vfs_BaseFile

Property Details

$config protected property
protected MOXMAN_Util_Config $config null
$fileSystem protected property
$meta protected property
protected MOXMAN_Vfs_FileMetaData $meta null
$path protected property
protected string $path null
$publicPath protected property
protected \[type] $publicPath null
$url protected property
protected string $url null

Method Details

__construct() public method

Creates a new absolute file.

public void __construct ( $fileSystem, $path )
$fileSystem MOXMAN_Vfs_FileSystem

MCManager reference.

$path string

Absolute path to local file.

canRead() public method

Returns true if the files is readable.

public boolean canRead ( )
return boolean

True if the files is readable.

canWrite() public method

Returns true if the files is writable.

public boolean canWrite ( )
return boolean

True if the files is writable.

copyTo() public method

Copies this file to the specified file instance.

public void copyTo ( MOXMAN_Vfs_IFile $dest )
$dest MOXMAN_Vfs_IFile

File to copy to.

delete() public method

Deletes the file.

public void delete ( $deep false )
$deep boolean

If this option is enabled files will be deleted recurive.

exists() public method

Returns true if the file exists.

public boolean exists ( )
return boolean

True if the file exists.

exportTo() public method

Exports the current file to the specified local path.

public void exportTo ( $localPath )
$localPath string

This is a description

getConfig() public method

Returns a config instance for the current file. The config is provided by the FileConfigProvider specified for the file system.

public MOXMAN_Util_Config getConfig ( )
return MOXMAN_Util_Config

Config instance for the file.

getFileSystem() public method

Returns the file system that created the file.

public \MOXMAN_FileSystem getFileSystem ( )
return \MOXMAN_FileSystem

File system instance that created the file.

getLastModified() public method

Returns last modification date in ms as an long.

public \long getLastModified ( )
return \long

Last modification date in ms as an long.

getMetaData() public method

Returns a meta data instance for the current file.

public MOXMAN_Vfs_FileMetaData getMetaData ( )
return MOXMAN_Vfs_FileMetaData

Meta data instance for the file.

getName() public method

Returns the file name of a file.

public string getName ( )
return string

File name of file.

getParent() public method

Returns the parent files absolute path or an empty string if there is no parent.

public String getParent ( )
return String

Parent files absolute path.

getParentFile() public method

Returns the parent files File instance.

public \File getParentFile ( )
return \File

Parent files File instance or false if there is no more parents.

getPath() public method

Returns the absolute path of the file.

public String getPath ( )
return String

Absolute path of the file.

getPublicLinkPath() public method

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

public String getPublicLinkPath ( )
return String

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

getPublicPath() public 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 String getPublicPath ( )
return String

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

getSize() public method

Returns file size as an long.

public \long getSize ( )
return \long

File size as an long.

getUrl() public method

Returns the public URL for the file.

public String getUrl ( )
return String

Public URL for the file.

importFrom() public method

Imports the specified local file to the current file instance.

public void importFrom ( $localPath )
$localPath string

This is a description

isDirectory() public method

Returns true if the file is a directory.

public boolean isDirectory ( )
return boolean

True if the file is a directory.

isFile() public method

Returns true if the file is a file.

public boolean isFile ( )
return boolean

True if the file is a file.

isHidden() public method

Returns true if the file is hidden.

public boolean isHidden ( )
return boolean

True if the file is a hidden file.

listFiles() public method

Returns an array of File instances.

public MOXMAN_Vfs_FileList listFiles ( )
return MOXMAN_Vfs_FileList

List of MOXMAN_Vfs_IFile instances.

listFilesFiltered() public method

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

public 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 method

Creates a new directory.

public void mkdir ( )
moveTo() public method

Renames/Moves this file to the specified file instance.

public void moveTo ( MOXMAN_Vfs_IFile $dest )
$dest MOXMAN_Vfs_IFile

File to rename/move to.

open() public method

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

public \MOXMAN_Vfs_IStream open ( $mode = \MOXMAN_Vfs_IStream::READ )
$mode string

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

return \MOXMAN_Vfs_IStream

File stream implementation for the file system.