Sha256: 93f830d7a5d9638739f5c54cd30457cc8be35a19ae4f8c62e76c9ccc53669f4f

Contents?: true

Size: 1001 Bytes

Versions: 2

Compression:

Stored size: 1001 Bytes

Contents

# FFI::Stat

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"

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install ffi-stat

## Usage

```ruby
require "ffi/stat"

file = "test.txt"
fd   = $stdin.fileno

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

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. Ensure all tests pass (`rake test`)
5. Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffi-stat-0.3.0 README.md
ffi-stat-0.2.0 README.md