StuBS
Inode Class Reference

#include <fs/inode.h>

Inheritance diagram for Inode:
[legend]
Collaboration diagram for Inode:
[legend]

Public Member Functions

 Inode (Filesystem *fs)
 
virtual ~Inode ()
 
bool is_new () const
 
void clear_new_flag ()
 
void mark_dirty ()
 
bool is_dirty () const
 
int write_to_disk ()
 
void get ()
 
void put ()
 

Public Attributes

ino_t ino
 
umode_t mode
 
unsigned int nlinks
 
uid_t uid
 
gid_t gid
 
off_t size
 
time_t atime
 
time_t mtime
 
time_t ctime
 
unsigned int refcount
 
Inodeicache_next
 
Filesystemfilesystem
 
int flags
 

Static Public Attributes

static const int DIRTY_FLAG = 0x1
 
static const int NEW_FLAG = 0x2
 

Constructor & Destructor Documentation

◆ Inode()

Inode::Inode ( Filesystem fs)
inlineexplicit

◆ ~Inode()

virtual Inode::~Inode ( )
inlinevirtual

Member Function Documentation

◆ is_new()

bool Inode::is_new ( ) const
inline

◆ clear_new_flag()

void Inode::clear_new_flag ( )
inline

◆ mark_dirty()

void Inode::mark_dirty ( )
inline

◆ is_dirty()

bool Inode::is_dirty ( ) const
inline

◆ write_to_disk()

int Inode::write_to_disk ( )
inline

◆ get()

void Inode::get ( )
inline

◆ put()

void Inode::put ( )
inline

Member Data Documentation

◆ ino

ino_t Inode::ino

◆ mode

umode_t Inode::mode

◆ nlinks

unsigned int Inode::nlinks

◆ uid

uid_t Inode::uid

◆ gid

gid_t Inode::gid

◆ size

off_t Inode::size

◆ atime

time_t Inode::atime

◆ mtime

time_t Inode::mtime

◆ ctime

time_t Inode::ctime

◆ refcount

unsigned int Inode::refcount

◆ icache_next

Inode* Inode::icache_next

◆ filesystem

Filesystem* Inode::filesystem

◆ flags

int Inode::flags

◆ DIRTY_FLAG

const int Inode::DIRTY_FLAG = 0x1
static

◆ NEW_FLAG

const int Inode::NEW_FLAG = 0x2
static

The documentation for this class was generated from the following file: