[][src]Module lms::file_ops

Contains utilities for copying, deleting, sorting, hashing files.

Structs

Dir

A struct that represents a single directory

File

A struct that represents a single file

FileSets

A struct that represents sets of different types of files

Symlink

A struct that represents a single symbolic link

Traits

FileOps

Interface for all file structs to perform common operations

Functions

compare_and_copy_files

Compares all files in files_to_compare in src with all files in files_to_compare in dest and copies them over if they are different, in parallel

copy_files

Copies all given files from src to dest in parallel

delete_files

Deletes all given files in parallel

delete_files_sequential

Deletes all given files sequentially

get_all_files

Recursively traverses a directory and all its subdirectories and returns a FileSets that contains all files and all directories

hash_file

Generates a hash of the given file, using the Seahash non-cryptographic hash function

hash_file_secure

Generates a hash of the given file, using the BLAKE2b cryptographic hash function

sort_files

Sorts (unstable) file paths in descending order by number of components, in parallel