Struct path_abs::open::FileOpen
[−]
[src]
pub struct FileOpen { /* fields omitted */ }
INTERNAL TYPE: do not use directly.
Use FileRead
, FileWrite
or FileEdit
instead.
Methods
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_path(path: PathFile, 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 Debug for FileOpen
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more