Sha256: 5b774a53cc38c2b5f81e03b61ddd8bbe3305812ec1b03f7fcf4382fa3c4a4b06

Contents?: true

Size: 579 Bytes

Versions: 2

Compression:

Stored size: 579 Bytes

Contents

require "ffi"

require "ffi/stat/timespec"
require "ffi/stat/stat"
require "ffi/stat/library"

module FFI
  module Stat
    def self.stat(path)
      stat_struct = FFI::Stat::Stat.new

      FFI::Stat::Library.stat(path, stat_struct.pointer)

      stat_struct
    end

    def self.lstat(path)
      stat_struct = FFI::Stat::Stat.new

      FFI::Stat::Library.lstat(path, stat_struct.pointer)

      stat_struct
    end

    def self.fstat(fd)
      stat_struct = FFI::Stat::Stat.new

      FFI::Stat::Library.fstat(fd, stat_struct.pointer)

      stat_struct
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffi-stat-0.0.2 lib/ffi/stat.rb
ffi-stat-0.0.1 lib/ffi/stat.rb