mirror of
https://github.com/ksherlock/profuse.git
synced 2025-01-10 23:29:42 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@128 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
9fc279ef64
commit
b8d728c781
56
Entry.h
56
Entry.h
@ -41,6 +41,8 @@ enum StorageType {
|
|||||||
|
|
||||||
class Entry {
|
class Entry {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
||||||
virtual ~Entry();
|
virtual ~Entry();
|
||||||
|
|
||||||
virtual void write(Buffer *) = 0;
|
virtual void write(Buffer *) = 0;
|
||||||
@ -108,6 +110,18 @@ private:
|
|||||||
|
|
||||||
class Directory : public Entry {
|
class Directory : public Entry {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
enum {
|
||||||
|
|
||||||
|
OffsetCreation = 0x18,
|
||||||
|
OffsetVersion = 0x1c,
|
||||||
|
OffsetMinVersion = 0x1d,
|
||||||
|
OffsetAccess = 0x1e,
|
||||||
|
OffsetEntryLength = 0x1f,
|
||||||
|
OffsetEntriesPerBlock = 0x20,
|
||||||
|
OffsetFileCount = 0x21
|
||||||
|
};
|
||||||
|
|
||||||
virtual ~Directory();
|
virtual ~Directory();
|
||||||
|
|
||||||
|
|
||||||
@ -151,6 +165,14 @@ private:
|
|||||||
class VolumeDirectory: public Directory {
|
class VolumeDirectory: public Directory {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
enum {
|
||||||
|
OffsetLastMod = 0x12,
|
||||||
|
OffsetFileNameCaseFlag = 0x16
|
||||||
|
|
||||||
|
OffsetBitmapPointer = 0x23,
|
||||||
|
OffsetTotalBlocks = 0x25
|
||||||
|
};
|
||||||
|
|
||||||
static VolumeDirectory *Create(const char *name, BlockDevice *device);
|
static VolumeDirectory *Create(const char *name, BlockDevice *device);
|
||||||
static VolumeDirectory *Create(BlockDevice *);
|
static VolumeDirectory *Create(BlockDevice *);
|
||||||
|
|
||||||
@ -182,11 +204,21 @@ private:
|
|||||||
|
|
||||||
// inode / free inode list?
|
// inode / free inode list?
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class SubDirectory : public Directory {
|
class SubDirectory : public Directory {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
enum {
|
||||||
|
OffsetPasswordEnabled = 0x10,
|
||||||
|
OffsetParentPointer = 0x23,
|
||||||
|
OffsetParentEntryNumber = 0x25,
|
||||||
|
OffsetParentEntryLength = 0x26
|
||||||
|
};
|
||||||
|
|
||||||
SubDirectory(FileEntry *);
|
SubDirectory(FileEntry *);
|
||||||
private:
|
private:
|
||||||
unsigned _parentPointer;
|
unsigned _parentPointer;
|
||||||
@ -198,6 +230,26 @@ private:
|
|||||||
class FileEntry : public Entry {
|
class FileEntry : public Entry {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
enum {
|
||||||
|
OffsetFileType = 0x10,
|
||||||
|
OffsetKeyPointer = 0x11,
|
||||||
|
OffsetBlocksUsed = 0x13,
|
||||||
|
OffsetEOF = 0x15,
|
||||||
|
OffsetCreation = 0x18,
|
||||||
|
|
||||||
|
OffsetVersion = 0x1c,
|
||||||
|
OffsetMinVersion = 0x1d,
|
||||||
|
|
||||||
|
OffsetFileNameCaseFlag = 0x1c,
|
||||||
|
|
||||||
|
OffsetAccess = 0x1e,
|
||||||
|
OffsetAuxType = 0x1f,
|
||||||
|
OffsetLastMod = 0x21,
|
||||||
|
OffsetHeaderPointer = 0x25
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
unsigned fileType() const { return _fileType; }
|
unsigned fileType() const { return _fileType; }
|
||||||
unsigned auxType() const { return _auxType; }
|
unsigned auxType() const { return _auxType; }
|
||||||
unsigned blocksUsed() const { return _blocksUsed; }
|
unsigned blocksUsed() const { return _blocksUsed; }
|
||||||
@ -210,6 +262,10 @@ public:
|
|||||||
DateTime modification() const { return _modification; }
|
DateTime modification() const { return _modification; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
void *acquirePointer();
|
||||||
|
void releasePointer();
|
||||||
|
|
||||||
unsigned _fileType;
|
unsigned _fileType;
|
||||||
unsigned _keyPointer;
|
unsigned _keyPointer;
|
||||||
unsigned _blocksUsed;
|
unsigned _blocksUsed;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user