Moai SDK
1.5 revision 1 (MoaiEdition)
|
Inherits MOAIGlobalClass< TYPE, SUPER >, and MOAIGlobalClass< TYPE, SUPER >.
Creates a folder at 'path' if none exists.
function affirmPath ( string path )
path | ( string ) |
Check for the existence of a file.
function checkFileExists ( string filename )
filename | ( string ) |
Check for the existence of a path.
function checkPathExists ( string path )
path | ( string ) |
Copy a file or directory to a new location.
function copy ( string srcPath, string destPath )
srcPath | ( string ) |
destPath | ( string ) |
Deletes a directory and all of its contents.
function deleteDirectory ( string path [, boolean recursive ] )
path | ( string ) |
recursive | ( boolean ) Optional. If true, the directory and all contents beneath it will be purged. Otherwise, the directory will only be removed if empty. |
Deletes a file.
function deleteFile ( string filename )
filename | ( string ) |
Returns the absolute path given a relative path.
function getAbsoluteDirectoryPath ( string path )
path | ( string ) |
Returns the absolute path to a file. Result includes the file name.
function getAbsoluteFilePath ( string filename )
filename | ( string ) |
Given an absolute path returns the relative path in relation to the current working directory.
function getRelativePath ( string path )
path | ( string ) |
Returns the path to current working directory.
function getWorkingDirectory ()
Lists the sub-directories contained in a directory.
function listDirectories ( [ string path ] )
path | ( string ) Optional. Path to search. Default is current directory. |
Lists the files contained in a directory.
function listFiles ( [ string path ] )
path | ( string ) Optional. Path to search. Default is current directory. |
Mount an archive as a virtual filesystem directory.
function mountVirtualDirectory ( string path [, string archive ] )
path | ( string ) Virtual path. |
archive | ( string ) Optional. Name of archive file to mount. Default value is nil. |
Renames a file or folder.
function rename ( string oldPath, string newPath )
oldPath | ( string ) |
newPath | ( string ) |
Sets the current working directory.
function setWorkingDirectory ( string path )
path | ( string ) |