inode - #ifndef _INODE_H_ # #define _INODE_H_ #include...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
#ifndef __INODE_H__ #define __INODE_H__ # #include <exception> #include <map> #include <vector> # using namespace std; u #include "trace.h" #include "util.h" # // // inode_t - // An inode is wither a directory or a plain file. // / enum inode_t {DIR_INODE, FILE_INODE}; e // // directory - // A directory is a list of paired strings (filenames) and inodes. // An inode in a directory may be a directory or a file. // / class inode; typedef map<string, inode *> directory; t // // class inode - // // inode ctor - // Create a new inode of the given type, using a union. // // get_inode_nr - // Retrieves the serial number of the inode. Inode numbers are // allocated in sequence by small integer. // // size - // Returns the size of an inode. For a directory, this is the // number of dirents. For a text file, the number of characters // when printed (the sum of the lengths of each word, plus the // number of words. // // readfile -
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/26/2010 for the course CMPS 109 taught by Professor Bailey,d during the Spring '08 term at UCSC.

Page1 / 2

inode - #ifndef _INODE_H_ # #define _INODE_H_ #include...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online