FileSystem
FileSystem this object allows you to get information about the files and directories.
Lib.Sys.FileSystem.exists(path) |
Tells if the file or directory specified by path exists. |
path - file / directory path location |
Lib.Sys.FileSystem.rename(path, newPath) |
Renames/moves the file or directory specified by path to newPath. |
path - file / directory path location newPath - file path to rename or move |
Lib.Sys.FileSystem.stat(path) |
Returns File Stat information on the file or directory specified by path. File Stat object fields: gid : Int - The user group id for the file's owner. |
path - file / directory path location |
Lib.Sys.FileSystem.fullPath(relPath) |
Returns the full path of the file or directory specified by relPath, which is relative to the current working directory. Symlinks will be followed and the path will be normalized. |
relPath - relative path to file / directory |
Lib.Sys.FileSystem.absolutePath(relPath) |
Returns the absolute / full path of the file or directory specified by relPath, |
relPath - relative path to file / directory |
Lib.Sys.FileSystem.isDirectory(path) |
Tells if the file or directory specified by path is a directory. |
path - file / directory path location |
Lib.Sys.FileSystem.createDirectory(path) |
Creates a directory specified by path. |
path - directory path location |
Lib.Sys.FileSystem.deleteFile(path) |
Deletes the file specified by path. |
path - file path location |
Lib.Sys.FileSystem.deleteDirectory(path) |
Deletes the directory specified by path. |
path - directory path location |
Lib.Sys.FileSystem.readDirectory(path) |
Returns the names of all files and directories in the directory specified |
path - directory path location |
Examples:
root = Lib.Media.FileSystem.File.applicationStorageDirectory.nativePath
if not Lib.Sys.FileSystem.exists(root) then
Lib.Sys.FileSystem.createDirectory(root)
end
Created with the Personal Edition of HelpNDoc: Create help files for the Qt Help Framework