- appendToFile
void appendToFile(NativePath path, string data)
void appendToFile(string path, string data)
Convenience function to append to a file.
- copyFile
void copyFile(NativePath from, NativePath to, bool overwrite)
void copyFile(string from, string to)
- createDirectory
void createDirectory(NativePath path)
void createDirectory(string path, Flag!"recursive" recursive)
- createTempFile
FileStream createTempFile(string suffix)
Creates and opens a temporary file for writing.
- existsFile
bool existsFile(NativePath path)
bool existsFile(string path)
- getFileInfo
FileInfo getFileInfo(NativePath path)
FileInfo getFileInfo(string path)
Stores information about the specified file/directory into 'info'
- getWorkingDirectory
NativePath getWorkingDirectory()
Returns the current working directory.
- iterateDirectory
int delegate(scope int delegate(ref FileInfo)) iterateDirectory(NativePath path)
int delegate(scope int delegate(ref FileInfo)) iterateDirectory(string path)
Enumerates all files in the specified directory.
- listDirectory
void listDirectory(NativePath path, bool delegate(FileInfo info) @(safe) del)
void listDirectory(string path, bool delegate(FileInfo info) @(safe) del)
void listDirectory(NativePath path, bool delegate(FileInfo info) @(system) del)
void listDirectory(string path, bool delegate(FileInfo info) @(system) del)
Enumerates all files in the specified directory.
- moveFile
void moveFile(NativePath from, NativePath to, bool copy_fallback)
void moveFile(string from, string to, bool copy_fallback)
- openFile
FileStream openFile(NativePath path, FileMode mode)
FileStream openFile(string path, FileMode mode)
Opens a file stream with the specified mode.
- readFile
ubyte[] readFile(NativePath path, ubyte[] buffer, size_t max_size)
ubyte[] readFile(string path, ubyte[] buffer, size_t max_size)
Read a whole file into a buffer.
- readFileUTF8
string readFileUTF8(NativePath path)
string readFileUTF8(string path)
Read a whole UTF-8 encoded file into a string.
- removeFile
void removeFile(NativePath path)
void removeFile(string path)
- watchDirectory
DirectoryWatcher watchDirectory(NativePath path, bool recursive)
Starts watching a directory for changes.
- watchDirectory
DirectoryWatcher watchDirectory(string path, bool recursive)
Undocumented in source. Be warned that the author may not have intended to support it.
- writeFile
void writeFile(NativePath path, ubyte[] contents)
void writeFile(string path, ubyte[] contents)
Write a whole file at once.
- writeFileUTF8
void writeFileUTF8(NativePath path, string contents)
Write a string into a UTF-8 encoded file.
File handling functions and types.