scriptlike.file.extras

Scriptlike $(SCRIPTLIKE_VERSION)

Extra Scriptlike-only functionality to complement $(MODULE_STD_FILE).

Members

Functions

existsAsDir
bool existsAsDir(in string path)
bool existsAsDir(in Path path)

Checks if the path exists as a directory.

existsAsFile
bool existsAsFile(in string path)
bool existsAsFile(in Path path)

Checks if the path exists as a file.

existsAsSymlink
bool existsAsSymlink(in string path)
bool existsAsSymlink(in Path path)

Checks if the path exists as a symlink.

isGroupExec
bool isGroupExec(Path path)
bool isGroupExec(string path)

Posix-only. Check the group executable bit of a file. File must exist.

isUserExec
bool isUserExec(Path path)
bool isUserExec(string path)

Posix-only. Check the user (ie "owner") executable bit of a file. File must exist.

isWorldExec
bool isWorldExec(Path path)
bool isWorldExec(string path)

Posix-only. Check the world (ie "other") executable bit of a file. File must exist.

removePath
void removePath(T name)

Delete name regardless of whether it's a file or directory. If it's a directory, it's deleted recursively, via $(API_FILE_WRAP rmdirRecurse). Throws if the file/directory doesn't exist.

tryCopy
bool tryCopy(T1 from, T2 to)

If 'from' exists, then copy. Otherwise, do nothing and return false.

tryMkdir
bool tryMkdir(T name)

If 'name' doesn't already exist, then mkdir. Otherwise, do nothing and return false.

tryMkdirRecurse
bool tryMkdirRecurse(T name)

If 'name' doesn't already exist, then mkdirRecurse. Otherwise, do nothing and return false.

tryRemove
bool tryRemove(T name)

If 'name' exists, then remove. Otherwise, do nothing and return false.

tryRemovePath
bool tryRemovePath(T name)

If name exists, then delete it regardless of whether it's a file or directory. If it doesn't already exist, do nothing and return false.

tryRename
bool tryRename(T1 from, T2 to)

If 'from' exists, then rename. Otherwise, do nothing and return false.

tryRmdir
bool tryRmdir(T name)

If 'name' exists, then rmdir. Otherwise, do nothing and return false.

tryRmdirRecurse
bool tryRmdirRecurse(T name)

If 'name' exists, then rmdirRecurse. Otherwise, do nothing and return false.

trySymlink
bool trySymlink(T1 original, T2 link)

Posix-only. If 'original' exists, then symlink. Otherwise, do nothing and return false.

Meta

Authors

Nick Sabalausky

License

zlib/libpng