Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

IO#pathconf

pathconf(p1)

Returns pathname configuration variable using fpathconf().

name should be a constant under Etc which begins with PC_.

The return value is an integer or nil. nil means indefinite limit. (fpathconf() returns -1 but errno is not set.)

Example
require 'etc'
IO.pipe {|r, w|
  p w.pathconf(Etc::PC_PIPE_BUF) #=> 4096
}
See also #path #pid #oflush #pos also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0