scriptlike.file.wrappers

Scriptlike $(SCRIPTLIKE_VERSION)

Wrappers for $(MODULE_STD_FILE) that add support for Scriptlike's $(API_PATH_EXTR Path), command echoing and dry-run features.

Members

Aliases

readFile
alias readFile = read

Alias of read, included to provide naming symmetry with writeFile, which helps avoid naming conflicts with std.stdio.write.

writeFile
alias writeFile = write

Alias of write to help avoid naming conflicts with std.stdio.write. A readFile is also provided for symmetry with writeFile.

Functions

append
void append(in Path name, in void[] buffer)
void append(in string name, in void[] buffer)

Like $(FULL_STD_FILE append), but supports Path, command echoing and dryrun.

chdir
void chdir(in Path pathname)

Like $(FULL_STD_FILE chdir), but supports Path and command echoing.

chdir
void chdir(in string pathname)

Like $(FULL_STD_FILE chdir), but supports Path and command echoing.

copy
void copy(in Path from, in Path to)
void copy(in string from, in Path to)
void copy(in Path from, in string to)
void copy(in string from, in string to)

Like $(FULL_STD_FILE copy), but supports Path, command echoing and dryrun.

dirEntries
auto dirEntries(string path, SpanMode mode, bool followSymlink = true)
auto dirEntries(Path path, SpanMode mode, bool followSymlink = true)
auto dirEntries(string path, string pattern, SpanMode mode, bool followSymlink = true)
auto dirEntries(Path path, string pattern, SpanMode mode, bool followSymlink = true)

Like $(FULL_STD_FILE dirEntries), but supports Path and command echoing.

exists
bool exists(in Path name)
bool exists(in string name)

Like $(FULL_STD_FILE exists), but supports Path and command echoing.

getAttributes
uint getAttributes(in Path name)
uint getAttributes(in string name)

Like $(FULL_STD_FILE getAttributes), but supports Path and command echoing.

getLinkAttributes
uint getLinkAttributes(in Path name)
uint getLinkAttributes(in string name)

Like $(FULL_STD_FILE getLinkAttributes), but supports Path and command echoing.

getSize
ulong getSize(in Path name)
ulong getSize(in string name)

Like $(FULL_STD_FILE getSize), but supports Path and command echoing.

getTimes
void getTimes(in Path name, out SysTime accessTime, out SysTime modificationTime)
void getTimes(in string name, out SysTime accessTime, out SysTime modificationTime)

Like $(FULL_STD_FILE getTimes), but supports Path and command echoing.

getTimesWin
void getTimesWin(in Path name, out SysTime fileCreationTime, out SysTime fileAccessTime, out SysTime fileModificationTime)
void getTimesWin(in string name, out SysTime fileCreationTime, out SysTime fileAccessTime, out SysTime fileModificationTime)

Windows-only. Like $(FULL_STD_FILE getTimesWin), but supports Path and command echoing.

getcwd
Path getcwd()

Like $(FULL_STD_FILE getcwd), but returns a Path.

mkdir
void mkdir(in Path pathname)
void mkdir(in string pathname)

Like $(FULL_STD_FILE mkdir), but supports Path, command echoing and dryrun.

mkdirRecurse
void mkdirRecurse(in Path pathname)
void mkdirRecurse(in string pathname)

Like $(FULL_STD_FILE mkdirRecurse), but supports Path, command echoing and dryrun.

read
void[] read(in Path name, size_t upTo = size_t.max)
void[] read(in string name, size_t upTo = size_t.max)

Like $(FULL_STD_FILE read), but supports Path and command echoing.

readLink
Path readLink(Path link)
string readLink(string link)

Posix-only. Like $(FULL_STD_FILE readLink), but supports Path and command echoing.

readText
S readText(in Path name)
S readText(in string name)

Like $(FULL_STD_FILE readText), but supports Path and command echoing.

remove
void remove(in Path name)
void remove(in string name)

Like $(FULL_STD_FILE remove), but supports Path, command echoing and dryrun.

rename
void rename(in Path from, in Path to)
void rename(in string from, in Path to)
void rename(in Path from, in string to)
void rename(in string from, in string to)

Like $(FULL_STD_FILE rename), but supports Path, command echoing and dryrun.

rmdir
void rmdir(in Path pathname)
void rmdir(in string pathname)

Like $(FULL_STD_FILE rmdir), but supports Path, command echoing and dryrun.

rmdirRecurse
void rmdirRecurse(in Path pathname)
void rmdirRecurse(in string pathname)

Like $(FULL_STD_FILE rmdirRecurse), but supports Path, command echoing and dryrun.

setTimes
void setTimes(in Path name, SysTime accessTime, SysTime modificationTime)
void setTimes(in string name, SysTime accessTime, SysTime modificationTime)

Like $(FULL_STD_FILE setTimes), but supports Path, command echoing and dryrun.

slurp
auto slurp(Path filename, in string format)
auto slurp(string filename, in string format)

Like $(FULL_STD_FILE slurp), but supports Path and command echoing.

symlink
void symlink(Path original, Path link)
void symlink(string original, Path link)
void symlink(Path original, string link)
void symlink(string original, string link)

Posix-only. Like $(FULL_STD_FILE symlink), but supports Path and command echoing.

tempDir
Path tempDir()

Like $(FULL_STD_FILE tempDir), but supports Path and command echoing.

thisExePath
Path thisExePath()

Like $(FULL_STD_FILE thisExePath), but supports Path and command echoing.

timeLastModified
SysTime timeLastModified(in Path name)
SysTime timeLastModified(in string name)
SysTime timeLastModified(in Path name, SysTime returnIfMissing)
SysTime timeLastModified(in string name, SysTime returnIfMissing)

Like $(FULL_STD_FILE timeLastModified), but supports Path and command echoing.

write
void write(in Path name, const void[] buffer)
void write(in string name, const void[] buffer)

Like $(FULL_STD_FILE write), but supports Path, command echoing and dryrun.

Properties

isDir
bool isDir [@property getter]
bool isDir [@property getter]

Like $(FULL_STD_FILE isDir), but supports Path and command echoing.

isFile
bool isFile [@property getter]
bool isFile [@property getter]

Like $(FULL_STD_FILE isFile), but supports Path and command echoing.

isSymlink
bool isSymlink [@property getter]
bool isSymlink [@property getter]

Like $(FULL_STD_FILE isSymlink), but supports Path and command echoing.

Meta

Authors

Nick Sabalausky

License

zlib/libpng