Skip to main content

read_directory

Function read_directory 

Source
fn read_directory(
    path: &Path,
    store: Option<Arc<dyn ObjectStore<Sha256HashValue>>>,
    threads: Option<usize>,
    hardlinks: HardlinkBehavior,
) -> Result<FileSystem<Sha256HashValue>>
Expand description

Read a filesystem tree from a directory path.

If a store is provided, large file contents are copied there and referenced by digest. The store must implement [ObjectStore].

The threads argument controls both the tokio worker thread count and the semaphore used to limit concurrent verity computations. Some(1) uses a single-threaded runtime; None or Some(n > 1) uses the multi-threaded scheduler.