Skip to main content

Module utils

Module utils 

Source

Structs§

DirectoryEntry
Directory entry information for tree generation
LocalFileSystemProvider
Local file system provider implementation

Traits§

FileSystemProvider
Trait for abstracting file system operations for tree generation

Functions§

generate_directory_tree
Generate a tree view of a directory structure using a generic file system provider
generate_password
Generate a secure password with alphanumeric characters and optional symbols
handle_large_output
Handle large output: if the output has >= max_lines, save the full content to session storage and return a string showing only the first or last max_lines lines with a pointer to the saved file. Returns Ok(final_string) or Err(error_string) on failure.
is_supported_file
Check if a directory entry represents a supported file type
matches_gitignore_pattern
Check if a path matches a gitignore pattern
pattern_matches_glob
Simple glob pattern matching for basic cases
read_gitignore_patterns
Read .gitignore patterns from the specified base directory
sanitize_text_output
Sanitize text output by removing control characters while preserving essential whitespace
should_include_entry
Check if a directory entry should be included based on gitignore patterns and file type support