Module: FFI::Stat

Defined in:
lib/ffi/stat/x86_64-darwin/stat.rb,
lib/ffi/stat/x86_64-linux/stat.rb,
lib/ffi/stat.rb

Defined Under Namespace

Modules: Native Classes: Stat, Timespec

Class Method Summary collapse

Class Method Details

.fstat(fd) ⇒ Object



51
52
53
54
55
56
57
# File 'lib/ffi/stat/x86_64-darwin/stat.rb', line 51

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

  FFI::Stat::Native.fstat(fd, stat.pointer)

  stat
end

.lstat(path) ⇒ Object



43
44
45
46
47
48
49
# File 'lib/ffi/stat/x86_64-darwin/stat.rb', line 43

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

  FFI::Stat::Native.lstat(path, stat.pointer)

  stat
end

.stat(path) ⇒ Object



35
36
37
38
39
40
41
# File 'lib/ffi/stat/x86_64-darwin/stat.rb', line 35

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

  FFI::Stat::Native.stat(path, stat.pointer)

  stat
end