The Pedigree Project  0.1
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
RamFs Class Reference

#include <RamFs.h>

+ Inheritance diagram for RamFs:
+ Collaboration diagram for RamFs:

Public Member Functions

virtual bool initialise (Disk *pDisk)
 
void setProcessOwnership (bool bEnable)
 
bool getProcessOwnership () const
 
virtual FilegetRoot () const
 
virtual String getVolumeLabel () const
 
- Public Member Functions inherited from Filesystem
 Filesystem ()
 
virtual ~Filesystem ()
 
virtual Filefind (const StringView &path)
 
virtual Filefind (const String &path)
 
virtual Filefind (const StringView &path, File *pStartNode)
 
virtual Filefind (const String &path, File *pStartNode)
 
bool createFile (const StringView &path, uint32_t mask, File *pStartNode=0)
 
bool createDirectory (const StringView &path, uint32_t mask, File *pStartNode=0)
 
bool createSymlink (const StringView &path, const String &value, File *pStartNode=0)
 
bool createLink (const StringView &path, File *target, File *pStartNode=0)
 
bool remove (const StringView &path, File *pStartNode=0)
 
DiskgetDisk ()
 
bool isReadOnly ()
 
virtual bool isCaseSensitive ()
 

Protected Member Functions

virtual bool createFile (File *parent, const String &filename, uint32_t mask)
 
virtual bool createDirectory (File *parent, const String &filename, uint32_t mask)
 
virtual bool createSymlink (File *parent, const String &filename, const String &value)
 
virtual bool remove (File *parent, File *file)
 
 RamFs (const RamFs &)
 
void operator= (const RamFs &)
 
- Protected Member Functions inherited from Filesystem
virtual bool createLink (File *parent, const String &filename, File *target)
 

Protected Attributes

Filem_pRoot
 
bool m_bProcessOwners
 
- Protected Attributes inherited from Filesystem
bool m_bReadOnly
 
Diskm_pDisk
 

Static Protected Attributes

static String m_VolumeLabel
 

Additional Inherited Members

- Public Types inherited from Filesystem
typedef Filesystem *(* ProbeCallback) (Disk *)
 

Detailed Description

Defines a filesystem that is completely in RAM.

Definition at line 86 of file RamFs.h.

Member Function Documentation

bool RamFs::createDirectory ( File parent,
const String filename,
uint32_t  mask 
)
protectedvirtual

createDirectory calls this after it has parsed the string path.

Implements Filesystem.

Definition at line 157 of file RamFs.cc.

References File::isDirectory().

bool RamFs::createFile ( File parent,
const String filename,
uint32_t  mask 
)
protectedvirtual

createFile calls this after it has parsed the string path.

Implements Filesystem.

Definition at line 146 of file RamFs.cc.

References File::isDirectory().

bool RamFs::createSymlink ( File parent,
const String filename,
const String value 
)
protectedvirtual

createSymlink calls this after it has parsed the string path.

Implements Filesystem.

Definition at line 168 of file RamFs.cc.

virtual File* RamFs::getRoot ( ) const
inlinevirtual

Returns the root filesystem node.

Implements Filesystem.

Definition at line 104 of file RamFs.h.

virtual String RamFs::getVolumeLabel ( ) const
inlinevirtual

Returns a string identifying the volume label.

Implements Filesystem.

Definition at line 108 of file RamFs.h.

References Filesystem::createDirectory(), Filesystem::createFile(), Filesystem::createSymlink(), and Filesystem::operator=().

bool RamFs::initialise ( Disk pDisk)
virtual

Populates this filesystem with data from the given Disk device.

Returns
true on success, false on failure.

Implements Filesystem.

Definition at line 139 of file RamFs.cc.

References RadixTree< T >::m_pRoot.

bool RamFs::remove ( File parent,
File file 
)
protectedvirtual

Remove a file given a parent and file, assuming path parsing already completed.

Implements Filesystem.

Definition at line 174 of file RamFs.cc.

References File::isDirectory().

Member Data Documentation

File* RamFs::m_pRoot
protected

Root filesystem node.

Definition at line 128 of file RamFs.h.


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