Struct io_providers::TempFs[][src]

pub struct TempFs { /* fields omitted */ }

Provides access to file I/O in a chroot-like temporary filesystem, located in the system's default temp directory. This temporary directory acts like the root of the filesystem: all absolute paths are relative to it, and any path which would traverse out of it is considered invalid.

Details to be aware of:

  • This is NOT intended to act as a secure sandbox; while it ought to handle edge cases such as path traversals and symbolic links correctly, no attempt has been made to verify that there is no way to circumvent this.
  • Fs::create_dir_all() is not currently implemented. It is possible to implement, but it's non-trivial to handle path traversals and symlinks for this function.

Methods

impl TempFs
[src]

Creates a new TempFs.

Returns the path to the root of this temporary filesystem.

Trait Implementations

impl Debug for TempFs
[src]

Formats the value using the given formatter. Read more

impl Fs for TempFs
[src]

Opens a file at path with the options specified by open_options. Read more

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

Creates a new, empty directory at the provided path. Read more

Recursively create a directory and all of its parent components if they are missing. Read more

Creates a new hard link on the filesystem. Read more

Given a path, query the file system to get information about a file, directory, etc. Read more

Read the entire contents of a file into a bytes vector. Read more

Returns an iterator over the entries within a directory. Read more

Reads a symbolic link, returning the file that the link points to. Read more

Read the entire contents of a file into a string. Read more

Removes an existing, empty directory. Read more

Removes a directory at this path, after removing all its contents. Use carefully! Read more

Removes a file from the filesystem. Read more

Rename a file or directory to a new name, replacing the original file if to already exists. Read more

Changes the permissions found on a file or a directory. Read more

Query the metadata about a file without following symlinks. Read more

Write a slice as the entire contents of a file. Read more

Auto Trait Implementations

impl Send for TempFs

impl Sync for TempFs