mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-11 17:01:22 +00:00
Update inlcuded ttvfs
This commit is contained in:
parent
fe0a91129f
commit
ffa26e4105
22 changed files with 327 additions and 153 deletions
|
@ -59,7 +59,6 @@ std::pair<DirBase*, DirBase*> DirBase::_getDirEx(const char *subdir, const char
|
|||
return std::make_pair(this, this);
|
||||
|
||||
DirBase *ret = NULL;
|
||||
DirBase *last = NULL;
|
||||
char *slashpos = (char *)strchr(subdir, '/');
|
||||
|
||||
// if there is a '/' in the string, descend into subdir and continue there
|
||||
|
@ -239,12 +238,13 @@ void Dir::forEachDir(DirEnumCallback f, void *user /* = NULL */, bool safe /* =
|
|||
}
|
||||
|
||||
|
||||
|
||||
bool Dir::add(File *f)
|
||||
{
|
||||
if(!f)
|
||||
return false;
|
||||
return _addRecursiveSkip(f, 0);
|
||||
}
|
||||
|
||||
bool Dir::_addSingle(File *f)
|
||||
{
|
||||
Files::iterator it = _files.find(f->name());
|
||||
|
||||
if(it != _files.end())
|
||||
|
@ -260,11 +260,8 @@ bool Dir::add(File *f)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Dir::addRecursive(File *f, size_t skip /* = 0 */)
|
||||
bool Dir::_addRecursiveSkip(File *f, size_t skip /* = 0 */)
|
||||
{
|
||||
if(!f)
|
||||
return false;
|
||||
|
||||
Dir *vdir = this;
|
||||
if(f->fullnameLen() - f->nameLen() > skip)
|
||||
{
|
||||
|
@ -285,7 +282,7 @@ bool Dir::addRecursive(File *f, size_t skip /* = 0 */)
|
|||
}
|
||||
}
|
||||
|
||||
return vdir->add(f);
|
||||
return vdir->_addSingle(f);
|
||||
}
|
||||
|
||||
void Dir::clearGarbage()
|
||||
|
@ -374,4 +371,12 @@ void DiskDir::load()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// ----- MemDir start here -----
|
||||
|
||||
MemDir *MemDir::createNew(const char *dir) const
|
||||
{
|
||||
return new MemDir(dir);
|
||||
}
|
||||
|
||||
VFS_NAMESPACE_END
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue