Implemented the new GetNextEntry() method in the root file system.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4647 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1fdfe0c39a
commit
1a5a709876
@ -63,7 +63,7 @@ RootFileSystem::Close(void *cookie)
|
||||
|
||||
|
||||
Node *
|
||||
RootFileSystem::Lookup(const char *name, bool traverseLinks)
|
||||
RootFileSystem::Lookup(const char *name, bool /*traverseLinks*/)
|
||||
{
|
||||
file_system_entry *entry = NULL;
|
||||
|
||||
@ -82,6 +82,20 @@ RootFileSystem::Lookup(const char *name, bool traverseLinks)
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
RootFileSystem::GetNextEntry(void *_cookie, char *name, size_t size)
|
||||
{
|
||||
dir_cookie *cookie = (dir_cookie *)_cookie;
|
||||
file_system_entry *entry;
|
||||
|
||||
entry = cookie->current = (file_system_entry *)list_get_next_item(&fList, cookie->current);
|
||||
if (entry != NULL)
|
||||
return entry->root->GetName(name, size);
|
||||
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
RootFileSystem::GetNextNode(void *_cookie, Node **_node)
|
||||
{
|
||||
@ -93,7 +107,6 @@ RootFileSystem::GetNextNode(void *_cookie, Node **_node)
|
||||
*_node = entry->root;
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
return B_ENTRY_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ class RootFileSystem : public Directory {
|
||||
|
||||
virtual Node *Lookup(const char *name, bool traverseLinks);
|
||||
|
||||
virtual status_t GetNextEntry(void *cookie, char *nameBuffer, size_t bufferSize);
|
||||
virtual status_t GetNextNode(void *cookie, Node **_node);
|
||||
virtual status_t Rewind(void *cookie);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user