Access/inspect the filesystem
Home: http://keplerproject.github.io/luafilesystem
This module is produced by the Kepler Project under the name "Lua File System"
Signature | hs.fs.attributes(filepath [, aName]) -> table or string or nil,error |
---|---|
Type | Function |
Description | Gets the attributes of a file Parameters:
Returns:
Notes:
|
Signature | hs.fs.chdir(path) -> true or (nil,error) |
---|---|
Type | Function |
Description | Changes the current working directory to the given path. Parameters:
Returns:
|
Signature | hs.fs.currentDir() -> string or (nil,error) |
---|---|
Type | Function |
Description | Gets the current working directory Parameters:
Returns:
|
Signature | hs.fs.dir(path) -> iter_fn, dir_obj |
---|---|
Type | Function |
Description | Creates an iterator for walking a filesystem path Parameters:
Returns:
Notes:
|
Signature | hs.fs.displayName(filepath) -> string |
---|---|
Type | Function |
Description | Returns the display name of the file or directory at a specified path. Parameters:
Returns:
|
Signature | hs.fs.fileUTI(path) -> string or nil |
---|---|
Type | Function |
Description | Returns the Uniform Type Identifier for the file location specified. Parameters:
Returns:
|
Signature | hs.fs.fileUTIalternate(fileUTI, type) -> string |
---|---|
Type | Function |
Description | Returns the fileUTI's equivalent form in an alternate type specification format. Parameters:
Returns:
|
Signature | hs.fs.getFinderComments(path) -> string |
---|---|
Type | Function |
Description | Get the Finder comments for the file or directory at the specified path Parameters:
Returns:
Notes:
|
Signature | hs.fs.getHomeDirectoryAsBookmark() -> data |
---|---|
Type | Function |
Description | Returns the Home Directory path as binary encoded bookmark data. Parameters:
Returns:
Notes:
|
Signature | hs.fs.getPathFromBookmark(data) -> string | nil |
---|---|
Type | Function |
Description | Gets the file path from a binary encoded bookmark. Parameters:
Returns:
Notes:
|
Signature | hs.fs.link(old, new[, symlink]) -> true or (nil,error) |
---|---|
Type | Function |
Description | Creates a link Parameters:
Returns:
|
Signature | hs.fs.lock(filehandle, mode[, start[, length]]) -> true or (nil,error) |
---|---|
Type | Function |
Description | Locks a file, or part of it Parameters:
Returns:
|
Signature | hs.fs.lockDir(path, [seconds_stale]) -> lock or (nil,error) |
---|---|
Type | Function |
Description | Locks a directory Parameters:
Returns:
Notes:
|
Signature | hs.fs.mkdir(dirname) -> true or (nil,error) |
---|---|
Type | Function |
Description | Creates a new directory Parameters:
Returns:
|
Signature | hs.fs.pathToAbsolute(filepath) -> string |
---|---|
Type | Function |
Description | Gets the absolute path of a given path Parameters:
Returns:
|
Signature | hs.fs.rmdir(dirname) -> true or (nil,error) |
---|---|
Type | Function |
Description | Removes an existing directory Parameters:
Returns:
|
Signature | hs.fs.setFinderComments(path, comment) -> boolean |
---|---|
Type | Function |
Description | Set the Finder comments for the file or directory at the specified path to the comment specified Parameters:
Returns:
Notes:
|
Signature | hs.fs.symlinkAttributes (filepath [, aname]) -> table or string or nil,error |
---|---|
Type | Function |
Description | Gets the attributes of a symbolic link Parameters:
Returns:
Notes:
|
Signature | hs.fs.temporaryDirectory() -> string |
---|---|
Type | Function |
Description | Returns the path of the temporary directory for the current user. Parameters:
Returns:
|
Signature | hs.fs.touch(filepath [, atime [, mtime]]) -> true or (nil,error) |
---|---|
Type | Function |
Description | Updates the access and modification times of a file Parameters:
Returns:
|
Signature | hs.fs.unlock(filehandle[, start[, length]]) -> true or (nil,error) |
---|---|
Type | Function |
Description | Unlocks a file or a part of it. Parameters:
Returns:
|