#cross-platform #extended-attributes #file #set #file-metadata

fsquirrel

fsquirrel is a cross-platform get/set extended file attributes

4 releases

0.1.3 Jul 18, 2025
0.1.2 Jul 12, 2025
0.1.1 Jun 21, 2025
0.1.0 Jun 20, 2025

#1534 in Filesystem

Download history 37/week @ 2025-12-19 31/week @ 2025-12-26 93/week @ 2026-01-02 155/week @ 2026-01-09 258/week @ 2026-01-16 170/week @ 2026-01-23 240/week @ 2026-01-30 240/week @ 2026-02-06 249/week @ 2026-02-13 185/week @ 2026-02-20 294/week @ 2026-02-27 176/week @ 2026-03-06 365/week @ 2026-03-13 183/week @ 2026-03-20 161/week @ 2026-03-27 214/week @ 2026-04-03

965 downloads per month
Used in 6 crates (2 directly)

MIT/Apache

14KB
260 lines

fsquirrel

Documentation crates.io Build

A small library for stashing custom extended attribute key-value pairs into file metadata, avoiding the need for sidecar files.

These attributes are may be preserved when files are copied to a compatible file system, but are always discarded in cases such as uploading to the internet. More specifically:

  • On Windows and MacOS, fs::copy can preserve them.
  • On Linux, only /usr/bin/cp --preserve=xattr can preserve them.

Platform support

On Unix (Android, Linux, MacOS, FreeBSD, NetBSD), this is a wrapper around xattr, hard-coded to the user. namespace.

On Windows, this uses NTFS Alternate Data Streams. It's not compatible with OS/2 exended attributes.

Features

  • Get 🕳️🌰🐿️
  • Set 🐿️💨 🌰
  • Remove 🌰🐿️💨 🕳️
  • List 🥜🌰🥔

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–39MB
~554K SLoC