Module scriptlike.file.wrappers

Scriptlike v0.10.3

Wrappers for std.file that add support for Scriptlike's Path, command echoing and dry-run features.

Functions

NameDescription
append(name, buffer) Like std.file.append, but supports Path, command echoing and dryrun.
chdir(pathname) Like std.file.chdir, but supports Path and command echoing.
copy(from, to) Like std.file.copy, but supports Path, command echoing and dryrun.
dirEntries(path, mode, followSymlink) Like std.file.dirEntries, but supports Path and command echoing.
exists(name) Like std.file.exists, but supports Path and command echoing.
getAttributes(name) Like std.file.getAttributes, but supports Path and command echoing.
getcwd() Like std.file.getcwd, but returns a Path.
getLinkAttributes(name) Like std.file.getLinkAttributes, but supports Path and command echoing.
getSize(name) Like std.file.getSize, but supports Path and command echoing.
getTimes(name, accessTime, modificationTime) Like std.file.getTimes, but supports Path and command echoing.
getTimesWin(name, fileCreationTime, fileAccessTime, fileModificationTime) Windows-only. Like std.file.getTimesWin, but supports Path and command echoing.
isDir(name) Like std.file.isDir, but supports Path and command echoing.
isFile(name) Like std.file.isFile, but supports Path and command echoing.
isSymlink(name) Like std.file.isSymlink, but supports Path and command echoing.
mkdir(pathname) Like std.file.mkdir, but supports Path, command echoing and dryrun.
mkdirRecurse(pathname) Like std.file.mkdirRecurse, but supports Path, command echoing and dryrun.
read(name, upTo) Like std.file.read, but supports Path and command echoing.
readLink(link) Posix-only. Like std.file.readLink, but supports Path and command echoing.
readLink(link) Posix-only. Like std.file.readLink, but supports Path and command echoing.
readText(name) Like std.file.readText, but supports Path and command echoing.
remove(name) Like std.file.remove, but supports Path, command echoing and dryrun.
rename(from, to) Like std.file.rename, but supports Path, command echoing and dryrun.
rmdir(pathname) Like std.file.rmdir, but supports Path, command echoing and dryrun.
rmdirRecurse(pathname) Like std.file.rmdirRecurse, but supports Path, command echoing and dryrun.
setTimes(name, accessTime, modificationTime) Like std.file.setTimes, but supports Path, command echoing and dryrun.
slurp(filename, format) Like std.file.slurp, but supports Path and command echoing.
symlink(original, link) Posix-only. Like std.file.symlink, but supports Path and command echoing.
symlink(original, link) Posix-only. Like std.file.symlink, but supports Path and command echoing.
tempDir() Like std.file.tempDir, but supports Path and command echoing.
thisExePath() Like std.file.thisExePath, but supports Path and command echoing.
timeLastModified(name) Like std.file.timeLastModified, but supports Path and command echoing.
write(name, buffer) Like std.file.write, but supports Path, command echoing and dryrun.

Aliases

NameTypeDescription
readFile Alias of read, included to provide naming symmetry with writeFile, which helps avoid naming conflicts with std.stdio.write.
writeFile Alias of write to help avoid naming conflicts with std.stdio.write. A readFile is also provided for symmetry with writeFile.