wefter 0.2.1-beta

Fully-customizable automation runtime using Lua
1
2
3
4
5
6
7
8
9
10
11
use anyhow::Result;
use std::{fs, path::PathBuf};

/// Get all entries in a directory
pub fn read_directory(path: &PathBuf) -> Result<Vec<PathBuf>> {
    Ok(fs::read_dir(path)?
        .into_iter()
        .flatten()
        .map(|e| e.path())
        .collect())
}