EventDriverFiles

Provides read/write operations on the local file system.

Members

Functions

addRef
void addRef(FileFD descriptor)

Increments the reference count of the given file.

adopt
FileFD adopt(int system_file_handle)
Undocumented in source.
cancelRead
void cancelRead(FileFD file)

Cancels an ongoing read operation.

cancelWrite
void cancelWrite(FileFD file)

Cancels an ongoing write operation.

close
void close(FileFD file, FileCloseCallback on_closed)

Disallows any reads/writes and removes any exclusive locks.

getSize
ulong getSize(FileFD file)
Undocumented in source.
isValid
bool isValid(FileFD handle)

Determines whether the given file handle is valid.

open
FileFD open(string path, FileOpenMode mode)
Undocumented in source.
rawUserData
void* rawUserData(FileFD descriptor, size_t size, DataInitializer initialize, DataInitializer destroy)

Low-level user data access. Use userData instead.

read
void read(FileFD file, ulong offset, ubyte[] buffer, IOMode mode, FileIOCallback on_read_finish)

Reads data from a file.

releaseRef
bool releaseRef(FileFD descriptor)

Decrements the reference count of the given file.

truncate
void truncate(FileFD file, ulong size, FileIOCallback on_finish)

Shrinks or extends a file to the specified size.

write
void write(FileFD file, ulong offset, const(ubyte)[] buffer, IOMode mode, FileIOCallback on_write_finish)

Writes data to a file

Properties

userData
FileFD userData [@property setter]

Retrieves a reference to a user-defined value associated with a descriptor.

Meta