![]() |
Murl Engine Lua Addon API
Version 1.0 beta
|
The system file access class.
Get all file names from a specified path.
Murl.Array.String GetFiles(String path)
path | The path to examine the files. |
Check if a file exists.
Boolean FileExists(String path)
path | The path and filename. |
Delete a file.
Boolean DeleteFile(String path)
path | The path to the file to delete. |
Move/rename a file.
Boolean MoveFile(String oldPath, String newPath)
oldPath | The current path to the file to move. |
newPath | The new path of the file. |
Get the size of a file in bytes.
Integer GetFileSize(String path)
path | The path to the file to check. |
Get all folder names from a specified path.
Murl.Array.String GetFolders(String path)
path | The path to examine the folders. |
Check if a folder exists.
Boolean FolderExists(String path)
path | The path and the folder. |
Create a folder.
Boolean CreateFolder(String path)
path | The path and the folder to create. |
Delete a folder.
Boolean DeleteFolder(String path, Boolean recursively)
path | The path and the folder to delete. |
recursively | If true, the folder and all contents are deleted. If false, the function fails when the folder is not empty. |
Move/rename a folder.
Boolean MoveFolder(String oldPath, String newPath)
oldPath | The current path to the folder to move. |
newPath | The new path of the folder. |
Get the creation time of a file or folder.
Boolean, Murl.System.Time GetItemCreationTime(String path, Murl.System.Time time)
path | The path to the file or folder to query. |
time | A reference to a time object to receive the creation time. |
Get the time a file or folder was most recently modified.
Boolean, Murl.System.Time GetItemModificationTime(String path, Murl.System.Time time)
path | The path to the file or folder to query. |
time | A reference to a time object to receive the last modification time. |
The default constructor.
Murl.System.File new()
Open a file.
Boolean Open(String fileName, Murl.IEnums.FileAccessMode mode)
fileName | The file name to open. |
mode | The access mode for opening the file. |
Close the file.
Boolean Close()
Check if the file is open.
Boolean IsOpen()
Get the size of the file.
Integer GetSize()
Get the file pointer position.
Integer GetPosition()
Set the file pointer position.
SetPosition(Integer position)
position | The file pointer position in bytes. |