Module tempfile

Source
Expand description

Temporary files and directories.

See crate ::tempfile.

Modules§

env

Structs§

Builder
Create a new temporary file or directory with custom options.
NamedTempFile
A named temporary file.
PathPersistError
Error returned when persisting a temporary file path fails.
PersistError
Error returned when persisting a temporary file fails.
SpooledTempFile
An object that behaves like a regular temporary file, but keeps data in memory until it reaches a configured size, at which point the data is written to a temporary file on disk, and further operations use the file on disk.
TempDir
A directory in the filesystem that is automatically deleted when it goes out of scope.
TempPath
A path to a named temporary file without an open file handle.

Enums§

SpooledData
A wrapper for the two states of a SpooledTempFile. Either:

Functions§

spooled_tempfile
Create a new SpooledTempFile. Also see spooled_tempfile_in.
spooled_tempfile_in
Construct a new SpooledTempFile, backed by a file in the specified directory. Use this when, e.g., you need the temporary file to be backed by a specific filesystem (e.g., when your default temporary directory is in-memory). Also see spooled_tempfile.
tempdir
Create a new temporary directory. Also see tempdir_in.
tempdir_in
Create a new temporary directory in a specific directory. Also see tempdir.
tempfile
Create a new temporary file. Also see tempfile_in.
tempfile_in
Create a new temporary file in the specified directory. Also see tempfile.