#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

#1098 in Filesystem

Download history 121/week @ 2025-09-15 154/week @ 2025-09-22 161/week @ 2025-09-29 166/week @ 2025-10-06 148/week @ 2025-10-13 213/week @ 2025-10-20 117/week @ 2025-10-27 148/week @ 2025-11-03 145/week @ 2025-11-10 227/week @ 2025-11-17 186/week @ 2025-11-24 215/week @ 2025-12-01 125/week @ 2025-12-08 83/week @ 2025-12-15 43/week @ 2025-12-22 14/week @ 2025-12-29

278 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–40MB
~561K SLoC