Module scriptlike.file.extras

Scriptlike v0.10.2

Extra Scriptlike-only functionality to complement std.file.

Functions

Name Description
existsAsDir Checks if the path exists as a directory.
existsAsFile Checks if the path exists as a file.
existsAsSymlink Checks if the path exists as a symlink.
isGroupExec Posix-only. Check the group executable bit of a file. File must exist.
isUserExec Posix-only. Check the user (ie "owner") executable bit of a file. File must exist.
isWorldExec Posix-only. Check the world (ie "other") executable bit of a file. File must exist.
removePath Delete name regardless of whether it's a file or directory.
tryCopy If 'from' exists, then copy. Otherwise, do nothing and return false.
tryMkdir If 'name' doesn't already exist, then mkdir. Otherwise, do nothing and return false.
tryMkdirRecurse If 'name' doesn't already exist, then mkdirRecurse. Otherwise, do nothing and return false.
tryRemove If 'name' exists, then remove. Otherwise, do nothing and return false.
tryRemovePath If name exists, then delete it regardless of whether it's a file or
tryRename If 'from' exists, then rename. Otherwise, do nothing and return false.
tryRmdir If 'name' exists, then rmdir. Otherwise, do nothing and return false.
tryRmdirRecurse If 'name' exists, then rmdirRecurse. Otherwise, do nothing and return false.
trySymlink Posix-only. If 'original' exists, then symlink. Otherwise, do nothing and return false.

Authors

Nick Sabalausky

Copyright

Copyright (C) 2014-2017 Nick Sabalausky

License

zlib/libpng