Skip to content
This repository has been archived by the owner on Aug 1, 2020. It is now read-only.
/ fs-stat Public archive

libc bindings for stat, lstat and fstat made accessible

License

Notifications You must be signed in to change notification settings

viktor-ku/fs-stat

Repository files navigation

fs-stat

Crate has been yanked because there are better alternatives:

  1. doc.rust-lang.org/stable/std/os/unix/fs/trait.MetadataExt.html
  2. nix

libc stat, lstat and fstat bindings to rust made accessible

Usage

Add the following to your Cargo.toml:

fs-stat = "0.1"

Features

All functions return standard std::io::Result with an std::io::Error if it find one and libc::stat if call was successful. Every unsafe bit and convertion magic from rust to C is handled by the library, so you don't have to write it :)

Contributing

Feel free to write an issue or suggest a pull request! I will be glad to further improve this library!

License

MIT License (LICENSE)