NAME

Filesys::POSIX::Mem - In-memory filesystem implementation

SYNOPSIS

my $fs = Filesys::POSIX->new(Filesys::POSIX::Mem->new,
    'noatime' => 1
);

$fs->mkdir('/mnt');
$fs->mount(Filesys::POSIX::Mem->new, '/mnt',
    'noatime' => 1
);

DESCRIPTION

Provides the base class representing an instance of the memory file system. All inode and directory entry data lives completely in memory, or in temporary files referenced by inode buckets as provided by Filesys::POSIX::Mem::Bucket file handles.

CREATING AND INITIALIZING THE FILESYSTEM

Filesys::POSIX::Mem->new

Creates a new, unmounted filesystem. The root inode of this filesystem is created as a directory with 0755 permissions.

$fs->init(%flags)

Stores the flags passed in the current filesystem object. This method is usually called by Filesys::POSIX::Mount when said filesystem object is mounted. These mount flags can be retrieved later.

DESTROYING THE FILESYSTEM

The filesystem object, as well as any of its constituent inodes, directories, and other data are cleaned up completely when the DESTROY method is called.