Struct ::filesystem::TempDir

Represents a temporary directory

The directory will be removed when this object is dropped

Methods

fn new() -> Result

Create a new temporary directory

fn path(self) -> String

Get the path to the temporary directory

fn read(self, path: String) -> Result

Read a file from the temporary directory

Returns a Result<Bytes>

fn write(self, path: String, contents: Bytes) -> Result

Write a temporary file under this directory, getting its path

Protocols

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.