NAME
Filesys::POSIX::FdTable - File descriptor table
DESCRIPTION
This internal module used by Filesys::POSIX handles the allocation and tracking of numeric file descriptors associated with inodes opened for I/O. It does not intend to expose any public interfaces.
METHODS
Filesys::POSIX::FdTable->new
-
Create a new file descriptor table object. Returns a blessed hash.
$fd_table->open($inode, $flags)
-
Asks the
$inode
object to open and return a Filesys::POSIX::IO::Handle object. Accepts flags as defined in Filesys::POSIX::Bits. A reference to the inode, file handle, flags passed will be stored.Returns a unused file descriptor number greater than 2, unique to the current file descriptor table, upon success.
$fd_table->lookup($fd)
-
Given a file descriptor number, return the file descriptor table entry stored; such an object contains an inode reference, a file handle reference, and the flags with which the file was opened.
$fd_table->close($fd)
-
Close the file handle corresponding to the given file descriptor, and remove the file descriptor from the table, freeing it for future reallocation.
$fd_table->list
-
Return a list of all file descriptor numbers currently allocated.