Expand description
Code to remove obsolete and extraneous files from a filesystem-based state directory.
Re-exportsΒ§
use std::path::Path;πuse std::path::PathBuf;πuse tor_basic_utils::PathExt as _;πuse tor_error::warn_report;πuse tracing::warn;πuse web_time_compat::Duration;πuse web_time_compat::SystemTime;π
ConstantsΒ§
- CUTOFF π
- How old must an obsolete-looking file be before weβre willing to remove it?
FunctionsΒ§
- files_
to_ πdelete - Implementation helper for
FsStateMgr::clean(): list all files instatepaththat are ready to delete as ofnow. - fname_
looks_ πobsolete - Return true if
pathlooks like a filename weβd like to remove from our state directory. - very_
old π - Return true if
entryis very old relative tonowand therefore safe to delete.