Struct native::io::file::CFile[src]

pub struct CFile {
    // some fields omitted
}

Methods

impl CFile

fn new(file: *FILE) -> CFile

Create a CFile from an open FILE pointer.

The CFile takes ownership of the FILE pointer and will close it upon destruction.

fn flush(&mut self) -> IoResult<()>

Trait Implementations

impl RtioFileStream for CFile

fn read(&mut self, buf: &mut [u8]) -> IoResult<int>

fn write(&mut self, buf: &[u8]) -> IoResult<()>

fn pread(&mut self, buf: &mut [u8], offset: u64) -> IoResult<int>

fn pwrite(&mut self, buf: &[u8], offset: u64) -> IoResult<()>

fn seek(&mut self, pos: i64, style: SeekStyle) -> IoResult<u64>

fn tell(&self) -> IoResult<u64>

fn fsync(&mut self) -> IoResult<()>

fn datasync(&mut self) -> IoResult<()>

fn truncate(&mut self, offset: i64) -> IoResult<()>

fn fstat(&mut self) -> IoResult<FileStat>

impl Drop for CFile

fn drop(&mut self)