From: KOSAKI Motohiro Date: 2012-02-07T04:52:55+09:00 Subject: [ruby-core:42375] Re: [ruby-trunk - Feature #5974][Open] Access PC_NAME_MAX and PC_PATH_MAX values > Hi, > > In order to construct file names that don't raise Errno::ENAMETOOLONG, I'd like to be able to access PC_NAME_MAX and PC_PATH_MAX from pathconf given a particular directory object. > > I've attached a patch which exposes both of these values on a Dir object. Hmm... I don't think it's useful. why? fpatchconf() doesn't have an enough portable and reliable meanings. example, fpathconf(PC_PATH_MAX) on linux glibc always return PATH_MAX (=4096). but some linux filesystems can only treat 256 bytes path length. Therefore, even if you properly checked path length, you still might get path length related error from syscalls. I'm afraid this method bring rubyist a misunderstand.