qubit-fs 0.1.0

Pluggable filesystem abstraction for Rust
Documentation
/*******************************************************************************
 *
 *    Copyright (c) 2026 Haixing Hu.
 *
 *    SPDX-License-Identifier: Apache-2.0
 *
 *    Licensed under the Apache License, Version 2.0.
 *
 ******************************************************************************/
//! Directory creation options.

use qubit_metadata::Metadata;

/// Options controlling directory or collection creation.
#[derive(Clone, Debug, PartialEq)]
pub struct CreateDirOptions {
    /// Whether missing parent directories should be created.
    pub recursive: bool,
    /// Whether an existing directory should be accepted.
    pub exists_ok: bool,
    /// User-defined metadata to attach when supported.
    pub user_metadata: Metadata,
}

impl Default for CreateDirOptions {
    #[inline]
    fn default() -> Self {
        Self {
            recursive: false,
            exists_ok: false,
            user_metadata: Metadata::new(),
        }
    }
}