Struct io_providers::NativeFs [−][src]
pub struct NativeFs;
Provides access to native file I/O.
Trait Implementations
impl Debug for NativeFs
[src]
impl Debug for NativeFs
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Default for NativeFs
[src]
impl Default for NativeFs
impl Fs for NativeFs
[src]
impl Fs for NativeFs
fn open<P: AsRef<Path>>(
&self,
path: P,
open_options: &OpenOptions
) -> Result<File>
[src]
fn open<P: AsRef<Path>>(
&self,
path: P,
open_options: &OpenOptions
) -> Result<File>
Opens a file at path
with the options specified by open_options
. Read more
fn copy<P: AsRef<Path>, Q: AsRef<Path>>(&self, from: P, to: Q) -> Result<u64>
[src]
fn copy<P: AsRef<Path>, Q: AsRef<Path>>(&self, from: P, to: Q) -> Result<u64>
Copies the contents of one file to another. This function will also copy the permission bits of the original file to the destination file. Read more
fn create_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
fn create_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
Creates a new, empty directory at the provided path. Read more
fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
Recursively create a directory and all of its parent components if they are missing. Read more
fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q
) -> Result<()>
[src]
fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(
&self,
src: P,
dst: Q
) -> Result<()>
Creates a new hard link on the filesystem. Read more
fn metadata<P: AsRef<Path>>(&self, path: P) -> Result<Metadata>
[src]
fn metadata<P: AsRef<Path>>(&self, path: P) -> Result<Metadata>
Given a path, query the file system to get information about a file, directory, etc. Read more
fn read<P: AsRef<Path>>(&self, path: P) -> Result<Vec<u8>>
[src]
fn read<P: AsRef<Path>>(&self, path: P) -> Result<Vec<u8>>
Read the entire contents of a file into a bytes vector. Read more
fn read_dir<P: AsRef<Path>>(&self, path: P) -> Result<ReadDir>
[src]
fn read_dir<P: AsRef<Path>>(&self, path: P) -> Result<ReadDir>
Returns an iterator over the entries within a directory. Read more
fn read_link<P: AsRef<Path>>(&self, path: P) -> Result<PathBuf>
[src]
fn read_link<P: AsRef<Path>>(&self, path: P) -> Result<PathBuf>
Reads a symbolic link, returning the file that the link points to. Read more
fn read_to_string<P: AsRef<Path>>(&self, path: P) -> Result<String>
[src]
fn read_to_string<P: AsRef<Path>>(&self, path: P) -> Result<String>
Read the entire contents of a file into a string. Read more
fn remove_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
fn remove_dir<P: AsRef<Path>>(&self, path: P) -> Result<()>
Removes an existing, empty directory. Read more
fn remove_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
fn remove_dir_all<P: AsRef<Path>>(&self, path: P) -> Result<()>
Removes a directory at this path, after removing all its contents. Use carefully! Read more
fn remove_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
[src]
fn remove_file<P: AsRef<Path>>(&self, path: P) -> Result<()>
Removes a file from the filesystem. Read more
fn rename<P: AsRef<Path>, Q: AsRef<Path>>(&self, from: P, to: Q) -> Result<()>
[src]
fn rename<P: AsRef<Path>, Q: AsRef<Path>>(&self, from: P, to: Q) -> Result<()>
Rename a file or directory to a new name, replacing the original file if to
already exists. Read more
fn set_permissions<P: AsRef<Path>>(
&self,
path: P,
perm: Permissions
) -> Result<()>
[src]
fn set_permissions<P: AsRef<Path>>(
&self,
path: P,
perm: Permissions
) -> Result<()>
Changes the permissions found on a file or a directory. Read more
fn symlink_metadata<P: AsRef<Path>>(&self, path: P) -> Result<Metadata>
[src]
fn symlink_metadata<P: AsRef<Path>>(&self, path: P) -> Result<Metadata>
Query the metadata about a file without following symlinks. Read more
fn write<P: AsRef<Path>, C: AsRef<[u8]>>(
&self,
path: P,
contents: C
) -> Result<()>
[src]
fn write<P: AsRef<Path>, C: AsRef<[u8]>>(
&self,
path: P,
contents: C
) -> Result<()>
Write a slice as the entire contents of a file. Read more