pub struct File { /* private fields */ }
Expand description
A file within the system’s standard temp directory that is automatically deleted when it goes out of scope.
Implementations§
source§impl File
impl File
sourcepub fn new_file() -> Result<File>
pub fn new_file() -> Result<File>
Create a new temporary file within the standard system temporary directory.
sourcepub fn new_symlink<T: AsRef<Path>>(target: T) -> Result<File>
pub fn new_symlink<T: AsRef<Path>>(target: T) -> Result<File>
Create a new temporary symlink within the standard system temporary directory, pointing at the given target.
sourcepub fn new_file_at<P: AsRef<Path>>(path: P) -> Result<File>
pub fn new_file_at<P: AsRef<Path>>(path: P) -> Result<File>
Create a new temporary file at the specified path.
Trait Implementations§
Auto Trait Implementations§
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