• Home
  • Raw
  • Download

Lines Matching full:directory

2 // file at the top-level directory of this distribution and at
23 /// Create a new temporary directory.
25 /// The `tempdir` function creates a directory in the file system
27 /// The directory will be automatically deleted when the `TempDir`s
36 /// If the directory can not be created, `Err` is returned.
45 /// // Create a directory inside of `env::temp_dir()`
52 /// // `tmp_dir` goes out of scope, the directory as well as
65 /// Create a new temporary directory in a specific directory.
67 /// The `tempdir_in` function creates a directory in the specified directory
69 /// The directory will be automatically deleted when the `TempDir`s
78 /// If the directory can not be created, `Err` is returned.
87 /// // Create a directory inside of the current directory.
94 /// // `tmp_dir` goes out of scope, the directory as well as
107 /// A directory in the filesystem that is automatically deleted when
110 /// The [`TempDir`] type creates a directory on the file system that
112 /// `TempDir` creates a new directory with a randomly generated name.
116 /// can be configured to manage a temporary directory in any location
122 /// value is dropped, the directory at the path will be deleted, along
125 /// inside the temporary directory once it has been deleted.
130 /// to delete the underlying directory. It's important to ensure that
132 /// directory are dropped before the `TempDir` goes out of scope. The
134 /// the directory; to instead handle errors call [`TempDir::close()`].
138 /// receiving a signal like `SIGINT`, then the temporary directory
143 /// Create a temporary directory with a generated name:
150 /// // Create a directory inside of `env::temp_dir()`
155 /// Create a temporary directory with a prefix in its name:
162 /// // Create a directory inside of `env::temp_dir()`,
184 /// Attempts to make a temporary directory inside of `env::temp_dir()`.
188 /// The directory and everything inside it will be automatically deleted
193 /// If the directory can not be created, `Err` is returned.
202 /// // Create a directory inside of `env::temp_dir()`
209 /// // `tmp_dir` goes out of scope, the directory as well as
219 /// Attempts to make a temporary directory inside of `dir`.
220 /// The directory and everything inside it will be automatically
225 /// If the directory can not be created, `Err` is returned.
234 /// // Create a directory inside of the current directory
245 /// Attempts to make a temporary directory with the specified prefix inside of
246 /// `env::temp_dir()`. The directory and everything inside it will be automatically
251 /// If the directory can not be created, `Err` is returned.
260 /// // Create a directory inside of the current directory
270 /// Attempts to make a temporary directory with the specified prefix inside
271 /// the specified directory. The directory and everything inside it will be
276 /// If the directory can not be created, `Err` is returned.
285 /// // Create a directory inside of the current directory
298 /// Accesses the [`Path`] to the temporary directory.
313 /// // Check that the temp directory actually exists.
316 /// // End of `tmp_dir` scope, directory will be deleted
319 /// // Temp directory should be deleted by now
328 /// Persist the temporary directory to disk, returning the [`PathBuf`] where it is located.
330 /// This consumes the [`TempDir`] without deleting directory on the filesystem, meaning that
331 /// the directory will no longer be automatically deleted.
344 /// // Persist the temporary directory to disk,
348 /// // Delete the temporary directory ourselves.
362 /// Closes and removes the temporary directory, returning a `Result`.
364 /// Although `TempDir` removes the directory on drop, in the destructor
366 /// directory, call `close` instead.
371 /// the files and directories contained with the temporary directory,
372 /// as well as from deleting the temporary directory itself. These errors
384 /// // Create a directory inside of `env::temp_dir()`.
392 /// // the directory will still be deleted when `tmp_dir` goes out
393 /// // of scope, but we won't know whether deleting the directory