Struct path_abs::open::FileOpen [−][src]
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]
path: P,
options: OpenOptions
) -> Result<FileOpen>
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
impl RefUnwindSafe for FileOpen
impl Send for FileOpen
impl Sync for FileOpen
impl Unpin for FileOpen
impl UnwindSafe for FileOpen
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,