README.md in ffi-stat-0.0.2 vs README.md in ffi-stat-0.2.0
- old
+ new
@@ -1,14 +1,16 @@
# FFI::Stat
-FFI bindings for libc stat. The primary use of this library is by other FFI libraries that require a stat struct.
+FFI platform-specific bindings for the stat struct and related functions. The
+primary use case of this library is assist other FFI libraries that require a
+stat struct.
## Installation
Add this line to your application's Gemfile:
- gem 'ffi-stat'
+ gem "ffi-stat"
And then execute:
$ bundle
@@ -22,21 +24,27 @@
require "ffi/stat"
file = "test.txt"
fd = $stdin.fileno
-FFI::Stat.stat(file) #=> FFI::Stat::Stat
-FFI::Stat.lstat(file) #=> FFI::Stat::Stat
-FFI::Stat.fstat(fd) #=> FFI::Stat::Stat
+if FFI::Platform.is_os("darwin")
+ FFI::Stat.stat(file) #=> FFI::Stat::Stat
+ FFI::Stat.lstat(file) #=> FFI::Stat::Stat
+ FFI::Stat.fstat(fd) #=> FFI::Stat::Stat
+end
```
## Platforms
-Currently FFI::Stat has only been tested and known to work on Mac OS X Mountain Lion. Support for other OS platforms are on the roadmap.
+FFI::Stat has support for the stat struct on the following platforms:
+* x86_64-darwin
+* x86_64-linux
+
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
-4. Push to the branch (`git push origin my-new-feature`)
-5. Create new Pull Request
+4. Ensure all tests pass (`rake test`)
+5. Push to the branch (`git push origin my-new-feature`)
+6. Create new Pull Request