Class: Sys::Filesystem::Structs::Statvfs

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/sys/unix/sys/filesystem/structs.rb

Overview

The Statvfs struct represents struct statvfs from sys/statvfs.h.

Class Method Summary collapse

Class Method Details

.linux64?Boolean

Private method that will determine the layout of the struct on Linux.

Returns:

  • (Boolean)


153
154
155
156
157
158
159
160
# File 'lib/sys/unix/sys/filesystem/structs.rb', line 153

def self.linux64?
  if RUBY_PLATFORM == 'java'
    ENV_JAVA['sun.arch.data.model'].to_i == 64
  else
    RbConfig::CONFIG['host_os'] =~ /linux/i &&
      (RbConfig::CONFIG['arch'] =~ /64/ || RbConfig::CONFIG['DEFS'] =~ /64/)
  end
end