#
hs.fs
Access/inspect the filesystem
This module is partial superset of LuaFileSystem 1.8.0 (http://keplerproject.github.io/luafilesystem/). It has been modified to remove functions which do not apply to macOS filesystems and additional functions providing macOS specific filesystem information have been added.
#
Submodules
#
API Overview
Functions - API calls offered directly by the extension
attributes chdir currentDir dir displayName fileUTI fileUTIalternate getFinderComments link lock lockDir mkdir pathFromBookmark pathToAbsolute pathToBookmark rmdir setFinderComments symlinkAttributes tagsAdd tagsGet tagsRemove tagsSet temporaryDirectory touch unlock urlFromPath
#
API Documentation
#
Functions
#
attributes
#
chdir
#
currentDir
#
dir
#
displayName
#
fileUTI
#
fileUTIalternate
| | |
| --------------------------------------------|-------------------------------------------------------------------------------------|
| Signature | hs.fs.fileUTIalternate(fileUTI, type) -> string
|
| Type | Function |
| Description | Returns the fileUTI's equivalent form in an alternate type specification format. |
| Parameters |
- a string containing a file UTI, such as one returned by
hs.fs.fileUTI
. - a string specifying the alternate format for the UTI. This string may be one of the following:
extension
- as a file extension, commonly used for platform independent file sharing when file metadata can't be guaranteed to be cross-platform compatible. Generally considered unreliable when other file type identification methods are available.mime
- as a mime-type, commonly used by Internet applications like web browsers and email applications.pasteboard
- as an NSPasteboard type (seehs.pasteboard
).ostype
- four character file type, most common pre OS X, but still used in some legacy APIs.
- the file UTI in the alternate format or nil if the UTI does not have an alternate of the specified type.