#sparse-file #coreutils

libfs

libfs is a library of file and filesystem operations that is supplementary to std::fs

20 releases

Uses new Rust 2024

0.9.3 Jan 29, 2026
0.9.2 Aug 27, 2025
0.9.1 Apr 11, 2025
0.8.1 Dec 18, 2024
0.5.0 Dec 20, 2023

#1713 in Filesystem

Download history 24/week @ 2025-12-02 58/week @ 2025-12-09 46/week @ 2025-12-16 24/week @ 2025-12-23 35/week @ 2025-12-30 97/week @ 2026-01-06 39/week @ 2026-01-13 35/week @ 2026-01-20 165/week @ 2026-01-27 141/week @ 2026-02-03 72/week @ 2026-02-10 53/week @ 2026-02-17 51/week @ 2026-02-24 43/week @ 2026-03-03 107/week @ 2026-03-10 31/week @ 2026-03-17

236 downloads per month
Used in 2 crates

GPL-3.0-only

48KB
1K SLoC

libfs: Advanced file and fs operations

libfs is a library of file and filesystem operations that is supplementary to std::fs. Current features:

  • High and mid-level functions for creating and copying sparse files.
  • Copying will use Linux copy_file_range where possible, with fall-back to userspace.
  • Scanning and merging extent information on filesystems that support it.
  • File permission copying, including xattrs.

Some of the features are Linux specific, but most have fall-back alternative implementations for other Unix-like OSs. Further support is todo.

libfs is part of the xcp project.

Crates.io doc.rs Github Actions

Dependencies

~12–18MB
~467K SLoC