Struct path_abs::open::FileOpen[][src]

pub struct FileOpen { /* fields omitted */ }

INTERNAL TYPE: do not use directly.

Use FileRead, FileWrite or FileEdit instead.

Implementations

impl FileOpen[src]

pub fn open<P: AsRef<Path>>(path: P, options: OpenOptions) -> Result<FileOpen>[src]

Open the file with the given OpenOptions.

pub fn open_abs<P: Into<PathAbs>>(
    path: P,
    options: OpenOptions
) -> Result<FileOpen>
[src]

Shortcut to open the file if the path is already absolute.

Typically you should use PathFile::open instead (i.e. file.open(options) or file.read()).

pub fn path(&self) -> &PathFile[src]

Get the path associated with the open file.

pub fn metadata(&self) -> Result<Metadata>[src]

Queries metadata about the underlying file.

This function is identical to std::fs::File::metadata except it has error messages which include the action and the path.

pub fn try_clone(&self) -> Result<FileOpen>[src]

Creates a new independently owned handle to the underlying file.

This function is identical to std::fs::File::try_clone except it has error messages which include the action and the path and it returns a FileOpen object.

Trait Implementations

impl AsRef<File> for FileOpen[src]

impl AsRef<FileOpen> for FileEdit[src]

impl AsRef<FileOpen> for FileRead[src]

impl AsRef<FileOpen> for FileWrite[src]

impl Borrow<File> for FileOpen[src]

impl<'a> Borrow<File> for &'a FileOpen[src]

impl Borrow<FileOpen> for FileEdit[src]

impl<'a> Borrow<FileOpen> for &'a FileEdit[src]

impl Borrow<FileOpen> for FileRead[src]

impl<'a> Borrow<FileOpen> for &'a FileRead[src]

impl Borrow<FileOpen> for FileWrite[src]

impl<'a> Borrow<FileOpen> for &'a FileWrite[src]

impl Debug for FileOpen[src]

impl From<FileEdit> for FileOpen[src]

impl From<FileRead> for FileOpen[src]

impl From<FileWrite> for FileOpen[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.