lfs Module
Filesystem helpers exposed by DCS.
Functions
add_location
Unknown.
attributes
Returns a table of file attributes.
attrs = lfs.attributes(path, attribute)
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
File or directory path. |
attribute |
string |
Yes |
Attribute to query. |
| Return |
Type |
Description |
attrs |
table |
File attributes, such as mode, modification, and size. |
chdir
Changes the current directory.
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
Directory path. |
create_lockfile
Unknown.
currentdir
Returns the install directory.
| Return |
Type |
Description |
path |
string |
Install directory. |
del_location
Unknown.
dir
Returns files and directories in the specified path.
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
Directory path. |
| Return |
Type |
Description |
entries |
table |
Files and directories in the path. |
locations
Returns available drives.
| Return |
Type |
Description |
drives |
table |
Available drives. |
md5sum
Returns the MD5 hash of a file.
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
File path. |
| Return |
Type |
Description |
hash |
string |
MD5 hash. |
mkdir
Creates a directory.
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
Directory path. |
normpath
Returns the normalized path.
normalized = lfs.normpath(path)
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
Path to normalize. |
| Return |
Type |
Description |
normalized |
string |
Normalized path. |
realpath
Returns the absolute path of a file.
absolute = lfs.realpath(path)
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
File path. |
| Return |
Type |
Description |
absolute |
string |
Absolute path. |
rmdir
Removes a directory.
| Parameter |
Type |
Required |
Description |
path |
string |
Yes |
Directory path. |
tempdir
Returns the DCS temporary directory.
| Return |
Type |
Description |
path |
string |
Temporary directory, usually AppData\Local\Temp\DCS. |
writedir
Returns the Saved Games directory.
| Return |
Type |
Description |
path |
string |
Saved Games directory path. |