W3cubDocs

/D

dmd.root.file

Compiler implementation of the D programming language http://dlang.org

Authors:
Walter Bright, http://www.digitalmars.com
License:
Boost License 1.0
Source
root/file.d
Documentation
https://dlang.org/phobos/dmd_root_file.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/file.d
struct FileBuffer;

Owns a (rmem-managed) file buffer.

pure nothrow @nogc @safe ubyte[] extractData();

Transfers ownership of the buffer to the caller.

struct File;
struct ReadResult;
pure nothrow @nogc @safe ubyte[] extractData();

Transfers ownership of the buffer to the caller.

static nothrow ReadResult read(const(char)* name);

Read the full content of a file.

static nothrow bool write(const(char)* name, const void[] data);

static nothrow bool write(const(char)[] name, const void[] data);

static nothrow bool write(const(char)* name, const(void)* data, size_t size);

Write a file, returning true on success.

static nothrow void remove(const(char)* name);

Delete a file.

© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/dmd_root_file.html