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

#include <Iso9660Filesystem.h>

+ Inheritance diagram for Iso9660Filesystem:
+ Collaboration diagram for Iso9660Filesystem:

Public Member Functions

virtual bool initialise (Disk *pDisk)
 
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 ()
 

Static Public Member Functions

static Filesystemprobe (Disk *pDisk)
 

Protected Member Functions

uintptr_t readBlock (File *pFile, uint64_t location)
 
size_t getBlockSize ()
 
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)
 
virtual DiskgetDisk ()
 
String parseName (Iso9660DirRecord &name)
 
String parseJolietName (Iso9660DirRecord &name)
 
bool isLeap (uint32_t year)
 
Time::Timestamp timeToUnix (Iso9660DirTimestamp &time)
 
FilefileFromDirRecord (Iso9660DirRecord &dir, size_t inodeNum, File *parent, bool bDirectory=false)
 
 Iso9660Filesystem (const Iso9660Filesystem &)
 
void operator= (const Iso9660Filesystem &)
 
- Protected Member Functions inherited from Filesystem
virtual bool createLink (File *parent, const String &filename, File *target)
 

Protected Attributes

Diskm_pDisk
 
Iso9660VolumeDescriptorPrimary m_PrimaryVolDesc
 
Iso9660VolumeDescriptorPrimary m_SuppVolDesc
 
Iso9660VolumeDescriptor m_VolDesc
 
Iso9660DirRecordm_RootDir
 
int m_JolietLevel
 
size_t m_BlockSize
 
size_t m_BlockNumber
 
String m_VolumeLabel
 
Filem_pRoot
 
- Protected Attributes inherited from Filesystem
bool m_bReadOnly
 
Diskm_pDisk
 

Friends

class Iso9660File
 
class Iso9660Directory
 

Additional Inherited Members

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

Detailed Description

This class provides an implementation of the ISO9660 filesystem.

Definition at line 33 of file Iso9660Filesystem.h.

Member Function Documentation

bool Iso9660Filesystem::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 241 of file Iso9660Filesystem.cc.

bool Iso9660Filesystem::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 235 of file Iso9660Filesystem.cc.

bool Iso9660Filesystem::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 247 of file Iso9660Filesystem.cc.

File * Iso9660Filesystem::getRoot ( ) const
virtual

Returns the root filesystem node.

Implements Filesystem.

Definition at line 203 of file Iso9660Filesystem.cc.

String Iso9660Filesystem::getVolumeLabel ( ) const
virtual

Returns a string identifying the volume label.

Implements Filesystem.

Definition at line 208 of file Iso9660Filesystem.cc.

References File::isDirectory().

bool Iso9660Filesystem::initialise ( Disk pDisk)
virtual

Populates this filesystem with data from the given Disk device.

Returns
true on success, false on failure.
Todo:
Obtain disk information (perhaps a new call in Disk?)

Implements Filesystem.

Definition at line 66 of file Iso9660Filesystem.cc.

References initialise(), NOTICE, and WARNING.

Referenced by initialise().

+ Here is the caller graph for this function:

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

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

Implements Filesystem.

Definition at line 253 of file Iso9660Filesystem.cc.

References VFS::addProbeCallback(), VFS::instance(), and Iso9660File::Iso9660File().

Member Data Documentation

size_t Iso9660Filesystem::m_BlockSize
protected

Block size, and block number, of the disk

Definition at line 136 of file Iso9660Filesystem.h.

int Iso9660Filesystem::m_JolietLevel
protected

Joliet level (0 if not using it)

Definition at line 133 of file Iso9660Filesystem.h.

Disk* Iso9660Filesystem::m_pDisk
protected

Our raw device.

Definition at line 124 of file Iso9660Filesystem.h.

Iso9660VolumeDescriptorPrimary Iso9660Filesystem::m_PrimaryVolDesc
protected

Our superblock

Definition at line 127 of file Iso9660Filesystem.h.

File* Iso9660Filesystem::m_pRoot
protected

Root filesystem node.

Definition at line 143 of file Iso9660Filesystem.h.

String Iso9660Filesystem::m_VolumeLabel
protected

Our volume label

Definition at line 140 of file Iso9660Filesystem.h.


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