find_source_dir

Function find_source_dir 

Source
pub fn find_source_dir(root: &Path) -> Option<PathBuf>
Expand description

Find the most recent .source_* directory in the given root.

Scans for directories matching .source_* pattern and returns the one with the highest timestamp (most recent).

§Arguments

  • root - Directory to search in (typically workspace or project root)

§Returns

Path to the most recent .source_* directory, or None if not found.

§Example

use std::path::Path;
use cargo_docs_md::source::find_source_dir;

if let Some(source_dir) = find_source_dir(Path::new(".")) {
    println!("Found source directory: {}", source_dir.display());
}