Skip to main content

Module sorting

Module sorting 

Source
Expand description

Logic for sorting files by type so models can then be trained on them.

Structs§

FileSortingResults
Results of sorting files by their file type
FileTypeUnion
Found file type, either a model type or a non-model type Think of this as a Union, but they aren’t safe.

Enums§

NonModelTypes
File types we’re likely to encounter, but we don’t think are good candidates for a model

Functions§

file_sorting
Sort files by file type by creating a directory based on the file type and making a symbolic link to the original file, so no files are actually deleted.
hash_depth
Build up directories representing the hash but don’t include the hash itself so the directory structure can be created before adding the file to the path.
parse_file_type_union
Clap parser function for FileTypeUnion types. Uses Serde to get the file type from a string, uses Clap to print allowed values.