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:
@@ -63,7 +63,7 @@ RootFileSystem::Close(void *cookie)
|
|||||||
|
|
||||||
|
|
||||||
Node *
|
Node *
|
||||||
RootFileSystem::Lookup(const char *name, bool traverseLinks)
|
RootFileSystem::Lookup(const char *name, bool /*traverseLinks*/)
|
||||||
{
|
{
|
||||||
file_system_entry *entry = NULL;
|
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
|
status_t
|
||||||
RootFileSystem::GetNextNode(void *_cookie, Node **_node)
|
RootFileSystem::GetNextNode(void *_cookie, Node **_node)
|
||||||
{
|
{
|
||||||
@@ -93,7 +107,6 @@ RootFileSystem::GetNextNode(void *_cookie, Node **_node)
|
|||||||
*_node = entry->root;
|
*_node = entry->root;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_ENTRY_NOT_FOUND;
|
return B_ENTRY_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class RootFileSystem : public Directory {
|
|||||||
|
|
||||||
virtual Node *Lookup(const char *name, bool traverseLinks);
|
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 GetNextNode(void *cookie, Node **_node);
|
||||||
virtual status_t Rewind(void *cookie);
|
virtual status_t Rewind(void *cookie);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user