Crate simple_fs

Source

Structs§

DebouncedEvent
A debounced event is emitted after a short delay.
ListOptions
Note: In the future, the lifetime might be removed, and iter_files will take Option<&ListOptions>.
SEvent
A greatly simplified file event struct, containing only one path and one simplified event kind. Additionally, these will be debounced on top of the debouncer to ensure only one path/kind per debounced event list.
SFile
An SFile can be constructed from a Path, io::DirEntry, or walkdir::DirEntry and guarantees the following:
SMeta
A simplified file metadata structure with common, normalized fields. All fields are guaranteed to be present.
SPath
An SPath is a posix normalized Path using camino Utf8PathBuf as strogate. It can be constructed from a String, Path, io::DirEntry, or walkdir::DirEntry
SWatcher
A simplified watcher struct containing a receiver for file system events and an internal debouncer.

Enums§

Error
SEventKind
Simplified event kind.

Constants§

DEFAULT_EXCLUDE_GLOBS

Functions§

create_file
ensure_dir
ensure_file_dir
get_buf_reader
get_buf_writer
get_depth
Computes the maximum depth required for a set of glob patterns.
get_glob_set
into_collapsed
Collapses a path buffer without performing I/O.
into_normalized
Normalizes a path by:
is_collapsed
Returns true if the path is already collapsed.
iter_dirs
Returns an iterator over directories in the specified dir filtered optionally by include_globs and list_options. This implementation uses the internal GlobsDirIter.
iter_files
list_dirs
Collects directories from iter_dirs into a Vec
list_files
longest_base_path_wild_free
needs_normalize
Checks if a path needs normalization.
read_to_string
try_into_collapsed
Same as into_collapsed except that if Component::Prefix or Component::RootDir is encountered in a path that is supposed to be relative, or if the path attempts to navigate above its starting point using .., it returns None.
watch
A simplified watcher that monitors a path (file or directory) and returns an SWatcher object with a standard mpsc Receiver for a Vec<SEvent>. Each SEvent contains one spath and one simplified event kind (SEventKind). This will ignore any path that cannot be converted to a string (i.e., it will only trigger events if the path is valid UTF-8)

Type Aliases§

Result