Skip to main content

collect_files

Function collect_files 

Source
pub(crate) fn collect_files(root: &Path, files: &mut Vec<PathBuf>) -> Result<()>
Expand description

Lists archived part-*.parquet files and removes stale temporary copies.

Walks root recursively. Files ending in TMP_SUFFIX are deleted and reported, since they can only be left over from an interrupted run. Files whose names start with part- and end with .parquet are appended to files. Everything else, including .inprogress and quarantined files, is ignored. Symbolic links to directories are not followed, and names that are not valid UTF-8 are skipped.

§Arguments

  • root - Directory to scan.
  • files - Output list; matching paths are appended in directory order.

§Errors

Returns an error if a directory cannot be read, a file type cannot be determined, or a stale temporary file cannot be deleted.