POSIX::1003::Pathconf - POSIX access to pathconf()
use POSIX::1003::Pathconf; # import all use POSIX::1003::Pathconf 'pathconf'; my $max = pathconf($filename, '_PC_PATH_MAX'); use POSIX::1003::Pathconf '_PC_PATH_MAX'; my $max = _PC_PATH_MAX($filename); use POSIX::1003::Pathconf qw(pathconf %pathconf); my $key = $pathconf{_PC_PATH_MAX}; $pathconf{_PC_NEW_KEY} = $value foreach my $name (keys %pathconf) ... use POSIX::1003::Pathconf qw(fpathconf); use POSIX::1003::FdIO qw(openfd); use Fcntl qw(O_RDONLY); my $fd = openfd $fn, O_RDONLY; my $max = fpathconf $fd, '_PC_PATH_MAX'; my $max = _PC_PATH_MAX($fd); foreach my $pc (pathconf_names) ...
With pathconf() you query filesystem limits for a certain existing location.
pathconf()
Returns the numeric value related to the NAME or undef.
undef
Returns a list with all known names, unsorted.
This exported variable is a tied HASH which maps _PC_* names on unique numbers, to be used with the system's pathconf() and fpathconf() functions.
_PC_*
fpathconf()
The following constants where detected on your system when the module got installed. The second column shows the value which where returned for a random file at the time.
_PC_2_SYMLINKS 1 _PC_PIPE_BUF 4096 _PC_ALLOC_SIZE_MIN 4096 _PC_PRIO_IO undef _PC_ASYNC_IO 1 _PC_REC_INCR_XFER_SIZE undef _PC_CHOWN_RESTRICTED 1 _PC_REC_MAX_XFER_SIZE undef _PC_FILESIZEBITS 64 _PC_REC_MIN_XFER_SIZE 4096 _PC_LINK_MAX 65000 _PC_REC_XFER_ALIGN 4096 _PC_MAX_CANON 255 _PC_SOCK_MAXBUF undef _PC_MAX_INPUT 255 _PC_SYMLINK_MAX undef _PC_NAME_MAX 255 _PC_SYNC_IO undef _PC_NO_TRUNC 1 _PC_VDISABLE 0 _PC_PATH_MAX 4096
This module is part of POSIX-1003 distribution version 0.95, built on August 23, 2013. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
Copyrights 2011-2013 on the perl code and the related documentation by [Mark Overmeer]. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install POSIX::1003, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::1003
CPAN shell
perl -MCPAN -e shell install POSIX::1003
For more information on module installation, please visit the detailed CPAN module installation guide.