pub struct File { /* private fields */ }
Implementations§
Source§impl File
impl File
Sourcepub fn create(path: &str) -> Result<Self>
pub fn create(path: &str) -> Result<Self>
Creates a new file in read-write mode; error if the file exists.
This function will create a file if it does not exist, or return an error if it does. This way, if the call succeeds, the file returned is guaranteed to be new.
pub fn metadata(&self) -> Result<Metadata>
Trait Implementations§
Source§impl Read for File
impl Read for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnwindSafe for File
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more