Murl Engine Lua Addon API  Version 1.0 beta
Murl.Util.FileTools

Utility class to read / write binary files.


Table members

Functions


Murl.Util.FileTools.LoadBinaryFile(name, data, byteSize)

Load a binary file.

Boolean, Murl.Data LoadBinaryFile(String name, Murl.Data data, Integer byteSize)

Parameters
nameThe file name.
dataThe data object to read the file into.
byteSizeThe maximum number of bytes to read, if zero the entire file is loaded.
Returns
Boolean true if successful.
Murl.Data data The data object to read the file into.

Murl.Util.FileTools.SaveBinaryFile(name, string)

Save a string to a binary file.

Boolean SaveBinaryFile(String name, String string)

Parameters
nameThe file name.
stringThe string to write into the file.
Returns
Boolean true if successful.

Murl.Util.FileTools.SaveBinaryFile(name, data)

Save data to a binary file.

Boolean SaveBinaryFile(String name, Murl.ConstData data)

Parameters
nameThe file name.
dataThe data object to write into the file.
Returns
Boolean true if successful.

Murl.Util.FileTools.FolderExists(path, create)

Check if a folder exists.

Boolean FolderExists(String path, Boolean create)

Parameters
pathThe path and the folder.
createIf the folder does not exist, create the folder if true.
Returns
Boolean true if the folder exists.