module FFI::Stat

Constants

S_IFBLK
S_IFCHR
S_IFDIR
S_IFIFO
S_IFLNK
S_IFMT

File types.

S_IFREG
S_IFSOCK
S_IRGRP
S_IROTH
S_IRUSR
S_IRWXG

Read, write, execute by group.

S_IRWXO

Read, write, execute by others.

S_IRWXU

Read, write, execute by owner.

S_ISGID
S_ISUID
S_ISVTX
S_IWGRP
S_IWOTH
S_IWUSR
S_IXGRP
S_IXOTH
S_IXUSR

Public Class Methods

fstat(fd) click to toggle source
# File lib/ffi/stat/x86_64-darwin/stat.rb, line 85
def self.fstat(fd)
  stat = FFI::Stat::Stat.new

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

  stat
end
lstat(path) click to toggle source
# File lib/ffi/stat/x86_64-darwin/stat.rb, line 77
def self.lstat(path)
  stat = FFI::Stat::Stat.new

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

  stat
end
stat(path) click to toggle source
# File lib/ffi/stat/x86_64-darwin/stat.rb, line 69
def self.stat(path)
  stat = FFI::Stat::Stat.new

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

  stat
end