Crate cloudmapper

Crate cloudmapper 

Source
Expand description

Core library for CloudMapper, providing data structures, rclone interaction logic, and report generation functionalities for analyzing cloud storage.

Structs§

File
Represents a processed file or directory within the internal tree structure.
Files
Main container struct holding all processed file/directory data and related information.
Hashes
Represents the collection of hash sums for a file, as reported by rclone lsjson --hash.
RawFile
Represents a single file or directory entry as directly parsed from rclone lsjson output.
RcloneAboutInfo
Structure for deserializing the JSON output of rclone about --json. Represents storage usage information for a remote.

Enums§

OutputMode
Specifies how the output tree/file structure report should be generated.

Functions§

generate_reports
Orchestrates the generation of all requested reports based on the processed file data. Builds the tree structure, finds duplicates, calculates sizes, and writes reports to the specified output directory according to the chosen mode.
parse_rclone_lsjson
Parses the JSON output string from rclone lsjson.
process_about_results
Processes the results from parallel rclone about command executions. Aggregates storage totals, formats a summary report, and writes it to disk.
run_command
Executes an external command (like rclone) and captures its output. Handles basic error checking and logging.

Type Aliases§

AboutResult
Helper type alias for the result of processing rclone about for a single remote in parallel. Contains either the remote name and its RcloneAboutInfo, or the remote name and an error message.