POSIX::1003::FileSystem - POSIX for the file-system
POSIX::1003::FileSystem is a POSIX::1003
use POSIX::1003::FileSystem qw(access R_OK); if(access($fn, R_OK)) # $fn is readible? use POSIX::1003::FileSystem qw(mkfifo); use Fcntl ':mode'; mkfifo($path, S_IRUSR|S_IWUSR) or die $!;
You may also need POSIX::1003::Pathconf.
Read man filetest before you start using this function! Use the *_OK constants for FLAGS.
man filetest
*_OK
Like chown(), but does not follow symlinks when encountered. Returns the number of files successfully changed.
chown()
Warning, POSIX uses different parameter order:
# POSIX specification: # int lchown(const char *path, uid_t owner, gid_t group); # Perl core implementation: my $successes = chown($uid, $gid, @filenames); use POSIX; POSIX::lchown($uid, $gid, $filename) or die $!; use POSIX::1003::FileSystem 'lchown'; my @successes = lchown($uid, $gid, @filenames);
Simply CORE::utime()
CORE::utime()
POSIX::utime($filename, $atime, $mtime); CORE::utime($atime, $mtime, @filenames);
To be used with access()
F_OK File exists R_OK is readable for me W_OK is writable for mee X_OK is executable for me
FILENAME_MAX Maximum length of a filename
LINK_MAX Maximum number of hard-links MAX_CANON NAME_MAX PATH_MAX TMP_MAX The minimum number of unique filenames generated by tmpnam (and tempnam when it uses tmpnam's name- space), or tempnam (the two are separate).
This module is part of POSIX-1003 distribution version 0.04, built on December 22, 2011. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself.
Copyrights of the perl code and the related documentation by 2011 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.