- acquirePrivilege
void acquirePrivilege(S name)
Undocumented in source. Be warned that the author may not have intended to support it.
- anyNewerThan
bool anyNewerThan(string[] sources, string target)
Returns true if the target file doesn't exist,
or any of the sources are newer than the target.
- atomic
auto atomic(staticMap!(Unqual, ParameterTypeTuple!impl) args)
- atomicDg
auto atomicDg(Impl impl, Args args)
Wrap an operation which creates a file or directory,
so that it is created safely and, for files, atomically
(by performing the underlying operation to a temporary
location, then renaming the completed file/directory to
the actual target location). targetName specifies the name
of the parameter containing the target file/directory.
- buildPath2
string buildPath2(string[] segments)
Undocumented in source. Be warned that the author may not have intended to support it.
- cached
auto cached(ParameterTypeTuple!impl args)
- cachedDg
auto cachedDg(Impl impl, Args args)
Wrap an operation so that it is skipped entirely
if the target already exists. Implies atomic.
- createReparsePoint
void createReparsePoint(char[] target, char[] print, char[] link)
Undocumented in source. Be warned that the author may not have intended to support it.
- dirLink
void dirLink(char[] original, char[] link)
Link a directory.
Uses symlinks on POSIX, and directory junctions on Windows.
- ensureDirExists
void ensureDirExists(string path)
Make sure that the given directory exists
(and create parent directories as necessary).
- ensurePathExists
void ensurePathExists(string fn)
Make sure that the path to the given file name
exists (and create directories as necessary).
- enumerateHardLinks
string[] enumerateHardLinks(string fn)
Enumerate all hard links to the specified file.
- fastFileList
string[] fastFileList(string pattern)
string[] fastFileList(string pattern0, string[] patterns)
Shell-like expansion of ?, * and ** in path components
- fastListDir
string[] fastListDir(string pathname, string pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
- fastListDir
string[] fastListDir(string pathname, string pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
- fileDigest
auto fileDigest(string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
- fileDigestCached
auto fileDigestCached(string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
- fileList
DirEntry[] fileList(string pattern)
DirEntry[] fileList(string pattern0, string[] patterns)
Shell-like expansion of ?, * and ** in path components
- forceDelete
void forceDelete(string fn, Flag!"recursive" recursive)
Forcibly remove a file or directory.
If atomic is true, the entire directory is deleted "atomically"
(it is first moved/renamed to another location).
On Windows, this will move the file/directory out of the way,
if it is in use and cannot be deleted (but can be renamed).
- forceDelete
deprecated void forceDelete(string fn, bool recursive)
Undocumented in source. Be warned that the author may not have intended to support it.
- getFileID
ulong getFileID(string fn)
Return a file's unique ID.
- getGroup
int getGroup(string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
- getMTime
deprecated SysTime getMTime(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
- getMounts
auto getMounts()
Returns an iterator of MountInfo structs.
- getOwner
int getOwner(string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
- getPathFilesystem
string getPathFilesystem(string path)
Get the name of the filesystem that the given path is mounted under.
- hardLink
void hardLink(string src, string dst)
Undocumented in source. Be warned that the author may not have intended to support it.
- hardLink
void hardLink(string src, string dst)
Undocumented in source. Be warned that the author may not have intended to support it.
- hardLinkCount
uint hardLinkCount(string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
- isHidden
bool isHidden(string fn)
Undocumented in source. Be warned that the author may not have intended to support it.
- linkXAttrs
auto linkXAttrs(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
- longPath
string longPath(string s)
Using UNC paths bypasses path length limitation when using Windows wide APIs.
- move
void move(string src, string dst)
Try to rename; copy/delete if rename fails
- newerThan
bool newerThan(string source, string target)
Returns true if the target file doesn't exist,
or source is newer than the target.
- openFile
File openFile(string fn, string mode)
- parseMountInfo
MountInfo parseMountInfo(char[] line)
Undocumented in source. Be warned that the author may not have intended to support it.
- prependPath
string prependPath(string target, string path)
Two-argument buildPath with reversed arguments.
Useful for UFCS chaining.
- pushd
auto pushd(string dir)
Change the current directory to the given directory. Does nothing if dir is null.
Return a scope guard which, upon destruction, restores the previous directory.
Asserts that only one thread has changed the process's current directory at any time.
- readAscii
ascii readAscii(string fileName)
Like std.file.readText for non-UTF8
- readFile
void[] readFile(File f)
Read a File (which might be a stream) into an array
- realPath
string realPath(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
- recreateEmptyDirectory
void recreateEmptyDirectory(string dir)
Create an empty directory, deleting
all its contents if it already exists.
- removeRecurse
void removeRecurse(string fn)
If fn is a directory, delete it recursively.
Otherwise, delete the file or symlink fn.
- safeReadln
string safeReadln(File f)
- setOwner
void setOwner(string fn, int uid, int gid)
Undocumented in source. Be warned that the author may not have intended to support it.
- symlink
void symlink(char[] original, char[] link)
Undocumented in source. Be warned that the author may not have intended to support it.
- syncUpdate
void syncUpdate(string fn, void[] data)
Atomically save data to a file (if the file doesn't exist,
or its contents differs). The update operation as a whole
is not atomic, only the write is.
- syncWrite
void syncWrite(string target, void[] data)
Write data to a file, and ensure it gets written to disk
before this function returns.
Consider using as atomic!syncWrite.
See also: syncUpdate
- toFile
void toFile(void[] data, char[] name)
Undocumented in source. Be warned that the author may not have intended to support it.
- touch
void touch(char[] target)
If target exists, update its modification time;
otherwise create it as an empty file.
- unescapeMountString
string unescapeMountString(char[] s)
Undocumented in source. Be warned that the author may not have intended to support it.
- writeFileAsync
Thread writeFileAsync(File f, void[] data)
Start a thread which writes data to f asynchronously.
- writeProxy
void writeProxy(string target, void[] data)
Undocumented in source. Be warned that the author may not have intended to support it.
- xAttrs
auto xAttrs(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
- xAttrs
auto xAttrs(File f)
Undocumented in source. Be warned that the author may not have intended to support it.
File stuff