------------------------------------------- The basic methods (or descriptions of them) have been pinched from the the Linux kernel /usr/src/linux/fs/libfs.c ------------------------------------------- dcache_dir_close dcache_dir_lseek dcache_dir_open dcache_readdir generic_read_dir simple_dir_inode_operations simple_dir_operations commit_write = Commit a write to a file empty - VFS = Is the directory empty fill_super = FS (SB) specific setup stuff getattr = Get the attributes of a specifc file/folder/link link/create = Create a link prepare_write = Prepare to do a write, the stage before we actually write... readpage = Read a pages worth of data from a file release_fs = detach a filesystem from the VFS tree rename = Rename a file from A to B rmdir = Delete a directory entry (if empty) statfs = get the basic details of a FS from the SB sync_file = Perform a write unlink/remove = Delete a link --------------------------- To avoid garbage we can't use the following... pin_fs = Attach a filesystem to the VFS tree ----------------------------------------------- To get around the whole issue of garbage collection we can pass the entire VFS object as an argument to all FS calls. ----------------------------------------------- --------------------------- VFS --------------------------- Description Provides an interface for the end user to control filesystems and the mount them So that perl's gerbage collection can work, we have to handle the decending an dascending of the filesystem tree at this level Methods new - Create a new VFS object mount unmount open getattr - Get the attributes of a file link lookup rename rmdir unlink Data --------------------------- Tree --------------------------- Description The object which stores and manipulates the basic VFS tree By storing the data in a seperate object we enable perls simple garbage collection to collect us since the only reference to the tree will be stored within the VFS object. This also means that we don't need to expose the underbelly to the outside world who want to use the VFS object which was our other option, passing the full vFS object to all VFS::Filesystem calls.. Methods new - Initialize the tree and return the relevant object mount + filesystem - The filesystem object to be used. + mountpoint - The file object on which to mount the fs - Add a filesystem into the VFS tree. - we need to have opened the file object first... Means we can perform our check before doing anything nasty. unmount + mountpoint - The file object that points to the mountpoint - remove a filesystem from the VFS tree - TRASHES the mountpoint that we were passed set_root + filesystem - The filesystem to be used as the root. - lock - setup a lock on the tree unlock - remove the lock on the tree Data - Bidirectional tree with a link to the start. Still needs - A method for accessing the tree! --------------------------- File --------------------------- Description Purely a unified front end to hide some of the internal workings of the filesystem from the users. Contains references to point to a specific File within a filesystem, and therefore a reference to the filesystem itself. Methods new - Create a new File object commit_write read write Data Filesystem - To which filesystem does this object belong? Filereferences - All the data a filesystem should need to reference a specific file --------------------------- Filesytem --------------------------- Description An internal object that provides the variable backends to File objects this backend API should deal with the differences between each of the different types of Filesystem transparently. Methods new - Create a new Filesystem object Data Filesystem - To which filesystem does this object belong? 1st generation children