mirror of
https://github.com/ksherlock/profuse.git
synced 2024-12-23 11:31:43 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@249 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
parent
c901f55b50
commit
ca431e43f9
@ -99,6 +99,7 @@ public:
|
||||
Pascal::Date lastBoot() const { return _lastBoot; }
|
||||
|
||||
FileEntry *fileAtIndex(unsigned i) const;
|
||||
FileEntry *fileByName(const char *name) const;
|
||||
|
||||
void addChild(FileEntry *child, unsigned blocks);
|
||||
|
||||
@ -112,6 +113,7 @@ public:
|
||||
|
||||
void sync();
|
||||
|
||||
|
||||
|
||||
protected:
|
||||
virtual void writeDirectoryEntry(LittleEndian::IOBuffer *);
|
||||
|
@ -160,6 +160,7 @@ VolumeEntry::VolumeEntry(Device::BlockDevice *device)
|
||||
|
||||
VolumeEntry::~VolumeEntry()
|
||||
{
|
||||
|
||||
std::vector<FileEntry *>::iterator iter;
|
||||
for(iter = _files.begin(); iter != _files.end(); ++iter)
|
||||
{
|
||||
@ -197,6 +198,19 @@ FileEntry *VolumeEntry::fileAtIndex(unsigned i) const
|
||||
return i < _files.size() ? _files[i] : NULL;
|
||||
}
|
||||
|
||||
FileEntry *VolumeEntry::fileByName(const char *name) const
|
||||
{
|
||||
|
||||
|
||||
std::vector<FileEntry *>::const_iterator iter;
|
||||
for(iter = _files.begin(); iter != _files.end(); ++iter)
|
||||
{
|
||||
FileEntry *e = *iter;
|
||||
if (::strcasecmp(name, e->name()) == 0) return e;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void *VolumeEntry::loadBlock(unsigned block)
|
||||
|
Loading…
Reference in New Issue
Block a user