Module fs

Source
Expand description

Utilities for filesystem operations.

Structs§

DataSource
A data source
PathContent
Information about the content on a path

Functions§

canonicalized_path_to_string
This function converts an already canonicalized path to a string.
key_to_path
Helper function that translates a key that was derived from the path_to_key function back into a path.
load_secret_keyrpc
Loads a iroh::SecretKey from the provided file, or stores a newly generated one at the given location.
path_content_info
Walks the directory to get the total size and number of files in directory or file
path_to_key
Helper function that creates a document key from a canonicalized path, removing the root and adding the prefix, if they exist
relative_canonicalized_path_to_string
This function converts a canonicalized relative path to a string, returning an error if the path is not valid unicode.
scan_dirrpc
Create data sources from a directory.
scan_pathrpc
Create data sources from a path.