Crate cfile_rs [] [src]

Structs

CFile

A wrapper around C's file type. Attempts to mimic the functionality if rust's std::fs::File while still allowing complete control of all I/O operations.

Error

The error type for I/O operations of the Read, Write, Seek, and associated traits.

Enums

ErrorKind

A list specifying general categories of I/O error.

SeekFrom

Enumeration of possible methods to seek within an I/O object.

Statics

APPEND_ONLY

A &'static str to be passed into the CFile::open method. It will only allow data to be appended to the end of the file.

APPEND_READ

A &'static str to be passed into the CFile::open method. It will allow data to be appended to the end of the file, and data to be read from the file. It will create the file if it doesn't exist.

RANDOM_ACCESS_MODE

A &'static str to be passed into the CFile::open method. It will open the file in a way that will allow reading and writing, including overwriting old data. It will not create the file if it does not exist.

READ_ONLY

A &'static str to be passed into the CFile::open method. It will only allow reading.

TRUNCATAE_RANDOM_ACCESS_MODE

A &'static str to be passed into the CFile::open method. It will open the file in a way that will allow reading and writing, including overwriting old data. It will create the file if it doesn't exist

UPDATE

A &'static str to be passed into the CFile::open method. It will open the file in a way that will allow reading and writing, including overwriting old data

WRITE_ONLY

A &'static str to be passed into the CFile::open method. It will only allow writing.

Traits

Read

The Read trait allows for reading bytes from a source.

Seek

The Seek trait provides a cursor which can be moved within a stream of bytes.

Write

A trait for objects which are byte-oriented sinks.

Functions

buffer

A utility function that creates a "buffer" of len bytes. A Vec is used because it is memory safe and has a bunch of useful functionality (duh).