smugmug-cli 0.5.1

A command-line tool for uploading photos to SmugMug with deduplication
Documentation
use anyhow::Result;
use std::path::Path;
use walkdir::WalkDir;

pub fn walk_directory(path: &Path) -> Result<Vec<walkdir::DirEntry>> {
    let mut entries = Vec::new();

    for entry in WalkDir::new(path)
        .follow_links(true)
        .into_iter()
        .filter_map(|e| e.ok())
    // Skip entries we can't access
    {
        // Only collect files, not directories
        if entry.file_type().is_file() {
            entries.push(entry);
        }
    }

    Ok(entries)
}