Struct native::io::file::FileDesc[src]
pub struct FileDesc {
// some fields omitted
}Methods
impl FileDesc
fn new(fd: fd_t, close_on_drop: bool) -> FileDesc
Create a FileDesc from an open C file descriptor.
The FileDesc will take ownership of the specified file descriptor and
close it upon destruction if the close_on_drop flag is true, otherwise
it will not close the file descriptor when this FileDesc is dropped.
Note that all I/O operations done on this object will be blocking, but they do not require the runtime to be active.