vibe.d beta banner
get vibe.d
0.10.0

Asynchronous I/O that doesn’t get in your way, written in D

Interface EventDriverFiles

Provides read/write operations on the local file system.

interface EventDriverFiles ;

Properties

NameTypeDescription
userData[set] TRetrieves a reference to a user-defined value associated with a descriptor.

Methods

NameDescription
addRef (descriptor) Increments the reference count of the given file.
adopt (system_file_handle)
cancelRead (file) Cancels an ongoing read operation.
cancelWrite (file) Cancels an ongoing write operation.
close (file, on_closed) Disallows any reads/writes and removes any exclusive locks.
getSize (file)
isValid (handle) Determines whether the given file handle is valid.
open (path, mode)
open (path, mode, on_opened)
read (file, offset, buffer, mode, on_read_finish) Reads data from a file.
releaseRef (descriptor) Decrements the reference count of the given file.
truncate (file, size, on_finish) Shrinks or extends a file to the specified size.
write (file, offset, buffer, mode, on_write_finish) Writes data to a file
rawUserData (descriptor, size, initialize, destroy) Low-level user data access. Use userData instead.
Authors
Copyright
License