mirror of
https://github.com/ksherlock/profuse.git
synced 2024-12-22 05:30:03 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@97 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
8090387723
commit
f8ddc09a70
@ -20,6 +20,8 @@ public:
|
||||
virtual bool readOnly() = 0;
|
||||
virtual void sync() = 0;
|
||||
|
||||
virtual unsigned blocks();
|
||||
|
||||
void zeroBlock(unsigned block);
|
||||
};
|
||||
|
||||
|
16
Buffer.cpp
16
Buffer.cpp
@ -15,6 +15,22 @@ void Buffer::push16le(uint16_t x)
|
||||
_buffer.push_back((x >> 8) & 0xff);
|
||||
}
|
||||
|
||||
|
||||
void Buffer::push24be(uint32_t x)
|
||||
{
|
||||
_buffer.push_back((x >> 16) & 0xff);
|
||||
_buffer.push_back((x >> 8) & 0xff);
|
||||
_buffer.push_back(x & 0xff);
|
||||
}
|
||||
|
||||
void Buffer::push24le(uint32_t x)
|
||||
{
|
||||
_buffer.push_back(x & 0xff);
|
||||
_buffer.push_back((x >> 8) & 0xff);
|
||||
_buffer.push_back((x >> 16) & 0xff);
|
||||
}
|
||||
|
||||
|
||||
void Buffer::push32be(uint32_t x)
|
||||
{
|
||||
_buffer.push_back((x >> 24) & 0xff);
|
||||
|
4
Buffer.h
4
Buffer.h
@ -21,6 +21,10 @@ public:
|
||||
void push16be(uint16_t);
|
||||
void push16le(uint16_t);
|
||||
|
||||
|
||||
void push24be(uint32_t);
|
||||
void push24le(uint32_t);
|
||||
|
||||
void push32be(uint32_t);
|
||||
void push32le(uint32_t);
|
||||
|
||||
|
@ -25,6 +25,7 @@ enum Access {
|
||||
};
|
||||
|
||||
enum StorageType {
|
||||
DeletedFile = 0x00,
|
||||
SeedlingFile = 0x01,
|
||||
SaplingFile = 0x02,
|
||||
TreeFile = 0x03,
|
||||
@ -166,6 +167,13 @@ private:
|
||||
class FileEntry : public Entry {
|
||||
public:
|
||||
|
||||
unsigned fileType() const { return _fileType; }
|
||||
unsigned auxType() const { return _auxType; }
|
||||
unsigned blocksUsed() const { return _blocksUsed; }
|
||||
unsigned eof() const { return _eof; }
|
||||
|
||||
DateTime creation() const { return _creation; }
|
||||
DateTime modification() const { return _modification; }
|
||||
|
||||
private:
|
||||
unsigned _fileType;
|
||||
|
Loading…
Reference in New Issue
Block a user