Class MOXMAN_Vfs_Local_File

InheritanceMOXMAN_Vfs_Local_File » MOXMAN_Vfs_BaseFile
ImplementsMOXMAN_Vfs_IFile

This is the local file system implementation of MOXMAN_Vfs_IFile.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Creates a new absolute file. MOXMAN_Vfs_Local_File
canRead() Returns true if the files is readable. MOXMAN_Vfs_Local_File
canWrite() Returns true if the files is writable. MOXMAN_Vfs_Local_File
copyTo() Copies this file to the specified file instance. MOXMAN_Vfs_Local_File
delete() Deletes the file. MOXMAN_Vfs_Local_File
exists() Returns true if the file exists. MOXMAN_Vfs_Local_File
exportTo() Exports the file to a local path. This is used by some operations that can be done in memory. MOXMAN_Vfs_Local_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() MOXMAN_Vfs_Local_File
getLastModified() Returns last modification date in ms as an long. MOXMAN_Vfs_Local_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_Vfs_Local_File
getUrl() Returns the public URL for the file. MOXMAN_Vfs_BaseFile
importFrom() Imports a local file into the file system. MOXMAN_Vfs_Local_File
isDirectory() Returns true if the file is a directory. MOXMAN_Vfs_Local_File
isFile() Returns true if the file is a file. MOXMAN_Vfs_Local_File
isHidden() Returns true if the file is hidden. MOXMAN_Vfs_BaseFile
listFiles() Returns an array of File instances. MOXMAN_Vfs_Local_File
listFilesFiltered() Returns an array of BaseFile instances based on the specified filter instance. MOXMAN_Vfs_Local_File
mkdir() Creates a new directory. MOXMAN_Vfs_Local_File
moveTo() Renames/Moves this file to the specified file instance. MOXMAN_Vfs_Local_File
open() Opens a file stream by the specified mode. The default mode is rb. MOXMAN_Vfs_Local_File

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 file to a local path. This is used by some operations that can be done in memory.

public string exportTo ( $localPath )
$localPath string

Local path to export file to.

return string

Local path that the file was exported to.

getInternalPath() public method

public void getInternalPath ( )
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.

getSize() public method

Returns file size as an long.

public \long getSize ( )
return \long

File size as an long.

importFrom() public method

Imports a local file into the file system.

public void importFrom ( $localPath )
$localPath string

Local file system path to import.

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.

listFiles() public method

Returns an array of File instances.

public array listFiles ( )
return array

Array of File instances.

listFilesFiltered() public method

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

public array listFilesFiltered ( MOXMAN_Vfs_IFileFilter $filter )
$filter MOXMAN_Vfs_IFileFilter

FileFilter instance to filter files by.

return array

Array of File instances based on the specified filter instance.

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.