Skip to main content

Crate trash_core

Crate trash_core 

Source
Expand description

Read-only readers for trash / deleted-file artifacts across operating systems. “Trash” is the umbrella term; each platform’s native artifact lives in its own module:

ModuleFeatureArtifact
windowswindowsRecycle Bin $I/$R index + content files
linuxlinuxfreedesktop.org / XDG info/*.trashinfo + files/
macosmacosTrash .DS_Store put-back records (ptbN/ptbL)
androidandroidMediaStore .trashed-/.pending- filename codec
iosiosPhotos.sqlite ZASSET Recently-Deleted rows

Every module is gated behind a same-named Cargo feature; all are enabled by default. A consumer that only needs one platform builds with --no-default-features --features <os> to drop the others’ dependencies.

Each reader decodes its artifact into a typed record and pairs metadata with content; none produces findings — the trash-forensic analyzer layers anomaly detection on top. All readers treat their inputs as attacker-controlled: bounds-checked, never panicking on hostile data.

For backward compatibility the Windows reader’s items are re-exported at the crate root (trash_core::parse_index, RecycleBinIndex, …) — that reader was this crate’s original sole contents.

Re-exports§

pub use windows::parse_index;
pub use windows::scan_pairs;
pub use windows::Error;
pub use windows::IndexVersion;
pub use windows::RecycleBinIndex;
pub use windows::RecycleBinPair;

Modules§

android
Read-only decoder for the Android MediaStore trash filename convention.
ios
Read-only reader for the iOS Photos “Recently Deleted” trash state in Photos.sqlite.
linux
Read-only reader for the Linux freedesktop.org / XDG Trash artifact.
macos
Read-only reader for the macOS Trash put-back metadata stored in a Trash folder’s .DS_Store file.
windows
Read-only reader for the Windows Recycle Bin $I index file format.