scriptlike.file.extras

Scriptlike $(SCRIPTLIKE_VERSION)

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

Members

Functions

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

Checks if the path exists as a directory.

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

Checks if the path exists as a file.

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

Checks if the path exists as a symlink.

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.

trySymlink
bool trySymlink(T1 original, T2 link)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta

License

zlib/libpng

Authors

Nick Sabalausky