Function collect_files_in_dir

Source
fn collect_files_in_dir(path: impl AsRef<Path>) -> Result<Vec<PathBuf>, Error>
Expand description

Collects all regular files in a directory in the order of an OpenPGP Transferable Public Key.

All top-level regular files in the directory are considered first. Afterwards, all regular files located in the following list of directories (if they exist) are considered, in the following order:

  • revocation: for Revocation Signature packets
  • directkey: for Direct Key Signature packets
  • uid: for User ID or User Attribute packets
  • subkey: for Subkey packets

ยงErrors

Returns an error if

  • entries in path cannot be retrieved,
  • reading an entry in path fails,
  • or recursively collecting regular files in any of the subdirectories (revocation, directkey, uid or subkey) fails.