HolyLib Wiki

filesystem

filesystem

This module provides many unrestricted filesystem functions
Supports: Linux32 | Windows32

Methods

filesystem.AddSearchPath( string folderPath, string gamePath, boolean addToTail = false )
Adds the given folder to the given game paths.
FSASYNC filesystem.AsyncRead( string fileName, string gamePath, function callback )
Reads a file async and calls the callback with the contents.
filesystem.CreateDir( string dirName, string gamePath = DATA )
Creates a directory in the given path.
filesystem.Delete( string fileName, string gamePath = DATA )
Deletes the given file or folder.
boolean filesystem.Exists( string fileName, string gamePath )
Checks if the give fileName exists in the given path. This doesn't work with folders!
table, table filesystem.Find( string fileName, string gamePath, string sorting = nameasc )
Finds and returns a table containing all files and folders in the given path.
string filesystem.FullPathToRelativePath( string filePath, string gamePath = nil )
Returns the relative path of the given file/folder.
boolean filesystem.IsDir( string folderName, string gamePath )
Checks if the give folder exists in the given path.
File filesystem.Open( string fileName, string fileMode, string gamePath = GAME )
Opens the given file from the given game path.
string filesystem.RelativePathToFullPath( string filePath, string gamePath )
Returns the full path of the given file/folder relative to the given game path.
Removes all searchpaths.
filesystem.RemoveSearchPath( string folderPath, string gamePath )
Removes the given folder from the given gamepath.
filesystem.RemoveSearchPaths( string gamePath )
Removes all searchpaths of the given game path.
boolean filesystem.Rename( string oldFileName, string newFileName, string gamePath = DATA )
Renames the given file/folder to the new name.
number filesystem.Size( string fileName, string gamePath = GAME )
Returns the size of the given file.
number filesystem.Time( string fileName, string gamePath = GAME )
Returns the time when the given file was last modified in unix time.
number filesystem.TimeAccessed( string fileName, string gamePath = GAME )
Returns the time when the given file was last accessed in unix time.
number filesystem.TimeCreated( string fileName, string gamePath = GAME )
Returns the time when the given file was created in unix time.