qubit_fs/temp/temp_file_options.rs
1/*******************************************************************************
2 *
3 * Copyright (c) 2026 Haixing Hu.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 *
7 * Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Temporary file creation options.
11
12use crate::FsPath;
13
14/// Options controlling temporary file creation.
15#[derive(Clone, Debug, Eq, PartialEq)]
16pub struct TempFileOptions {
17 /// Parent directory or prefix for the temporary file.
18 pub parent: Option<FsPath>,
19 /// Name prefix.
20 pub prefix: String,
21 /// Name suffix.
22 pub suffix: String,
23}
24
25impl Default for TempFileOptions {
26 #[inline]
27 fn default() -> Self {
28 Self {
29 parent: None,
30 prefix: ".tmp-".to_owned(),
31 suffix: String::new(),
32 }
33 }
34}