Filesys::POSIX::Inode - Base class for filesystem inode objects
Provides a base class for filesystem-type dependent inode objects. This class offers a number of methods used to help determine the nature of the inode by analyzing its attributes.
$inode->dir
Returns true if the current inode refers to a directory.
$inode->link
Returns true if the current inode is a symlink.
$inode->file
Returns true if the current inode is a regular file.
$inode->char
Returns true if the current inode is a character device.
$inode->block
Returns true if the current inode is a block device.
$inode->fifo
Returns true if the current inode is a FIFO.
$inode->sock
Returns true if the current inode refers to a socket.
$inode->major
If the current inode is a block or character device, return the major number. Otherwise, an EINVAL is thrown.
$inode->minor
If the current inode is a block or character device, return the minor number. Otherwise, an EINVAL is thrown.
$inode->perms
Returns the permissions bitfield value of the current inode's mode attribute.
$inode->readable
Returns true if the inode is readable by anyone.
$inode->writable
Returns true if the inode is writable by anyone.
$inode->executable
Returns true if the inode is executable by anyone.
$inode->setuid
Returns true if the inode has a setuid bit set.
$inode->setgid
Returns true if the inode has a setgid bit set.
$inode->update(@st)
Updates the current inode object with a list of values as returned by stat().
$inode->directory
If the current inode is a directory, return the directory object held by it. Otherwise, an ENOTDIR is thrown.
$inode->empty
Uses the above $inode->directory() call to obtain the directory for the current inode, and returns the result of $directory->empty().
$inode->directory()
$directory->empty()
Written by Xan Tronix <xan@cpan.org>
Copyright (c) 2014, cPanel, Inc. Distributed under the terms of the Perl Artistic license.
To install Filesys::POSIX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Filesys::POSIX
CPAN shell
perl -MCPAN -e shell install Filesys::POSIX
For more information on module installation, please visit the detailed CPAN module installation guide.