Issue #5974 has been updated by Yui NARUSE.


The portable way to check the too long filename is just make a file and catch Errno::ENAMETOOLONG.
Unix has many related constants and functions but they are useless.
----------------------------------------
Feature #5974: Access PC_NAME_MAX and PC_PATH_MAX values
https://bugs.ruby-lang.org/issues/5974

Author: Aaron Patterson
Status: Rejected
Priority: Normal
Assignee: 
Category: 
Target version: 


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.


-- 
http://bugs.ruby-lang.org/