Filesys::POSIX::Userland - Provide implementations for higher-level, "userland" functionality in Filesys::POSIX
This module is a mixin imported by Filesys::POSIX into its own namespace, and provides a variety of higher-level calls to supplement the normal suite of system calls provided in Filesys::POSIX itself.
Similar to the
-pflag that can be passed to mkdir(1), this method attempts to create a hierarchy of directories specified in
$path. Each path component created will be made with the mode specified by
$mode, if any, if a directory in that location does not already exist. Exceptions will be thrown if one of the items along the path hierarchy exists but is not a directory.
A default mode of 0777 is assumed; only the permissions field of
$modeis used when it is specified. In both cases, the mode specified is modified with exclusive OR by the current umask value.
Returns a string representation of the current working directory.
Returns a string representation of the full, true and original path of the inode specified by
$fs->stat, the inode of
$pathis resolved, then starting at that inode, each subsequent inode's name is found from its parent and appended to a list of path components.
Returns a newly opened directory handle for the item pointed to by
$path. Using other methods in this module, the directory can be read and closed.
Read the next member of the directory passed. Returns undef if there are no more entries to be read.
Closes the directory handle for reading.
Acts like the userland utility touch(). Uses
$O_CREATflag to open the file specified by
$path, and immediately closes the file descriptor returned. This causes an update of the inode modification time for existing files, and the creation of new, empty files otherwise.
Written by Xan Tronix <email@example.com>
Copyright (c) 2014, cPanel, Inc. Distributed under the terms of the Perl Artistic license.