dmd.root.file
Read a file from disk and store it in memory.
License
Source: root/file.d
Documentation: https://dlang.org/phobos/dmd_root_file.html
-
Declaration
structFileBuffer;Owns a (rmem-managed) file buffer.
-
Declaration
pure nothrow @nogc @safe ubyte[]extractSlice();Transfers ownership of the buffer to the caller.
-
-
Declaration
structFile;-
Declaration
structReadResult;-
Declaration
pure nothrow @nogc @safe ubyte[]extractSlice();Transfers ownership of the buffer to the caller.
-
Declaration
pure nothrow @nogc ubyte[]extractDataZ();ditto Include the
null-terminator at the end of the buffer in the returned array.
-
-
Declaration
static nothrow ReadResultread(const(char)*name);
static nothrow ReadResultread(const(char)[]name);Read the full content of a file.
-
Declaration
static nothrow boolwrite(const(char)*name, const void[]data);
static nothrow boolwrite(const(char)[]name, const void[]data);
static nothrow boolwrite(const(char)*name, const(void)*data, size_tsize);Write a file, returning
trueon success. -
Declaration
static nothrow voidremove(const(char)*name);Delete a file.
-