https://github.com/codehz/bun-xattr
https://github.com/codehz/bun-xattr
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/codehz/bun-xattr
- Owner: codehz
- Created: 2023-09-29T02:32:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-05T14:36:56.000Z (almost 2 years ago)
- Last Synced: 2025-06-10T19:16:49.613Z (10 months ago)
- Language: TypeScript
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bun-xattr
Bun wrapper for getting, setting, removing and listing extended attributes on files.
OS Support: macOS and Linux (I will try to add support for windows via NtSetEaFile/NtQueryEaFile in future)
usage:
```typescript
import { setxattr, listxattr, getxattr, removexattr } from "bun-xattr";
const file = "./path/to/file";
setxattr(file, "user.mime", "text/html");
console.log(listxattr(file));
console.log(getxattr(file, "user.mime"));
removexattr(file, "user.mime");
```