From 8ebf479bc5db8cf4996cc0820269aaf04139b940 Mon Sep 17 00:00:00 2001 From: David Corrales Date: Sun, 17 Jun 2007 17:17:38 +0000 Subject: Added a new parameter to the getChildren function, which allows including hidden files in the results. svn-id: r27514 --- common/fs.cpp | 4 ++-- common/fs.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'common') diff --git a/common/fs.cpp b/common/fs.cpp index fc091262d7..6eaa35e67f 100644 --- a/common/fs.cpp +++ b/common/fs.cpp @@ -105,13 +105,13 @@ FilesystemNode FilesystemNode::getChild(const Common::String &n) const { return FilesystemNode(node); } -bool FilesystemNode::getChildren(FSList &fslist, ListMode mode) const { +bool FilesystemNode::getChildren(FSList &fslist, ListMode mode, bool hidden) const { if (!_realNode || !_realNode->isDirectory()) return false; AbstractFSList tmp; - if (!_realNode->getChildren(tmp, mode)) + if (!_realNode->getChildren(tmp, mode, hidden)) return false; fslist.clear(); diff --git a/common/fs.h b/common/fs.h index 328bebb15b..7291fb75fc 100644 --- a/common/fs.h +++ b/common/fs.h @@ -67,7 +67,6 @@ class FilesystemNode { private: int *_refCount; AbstractFilesystemNode *_realNode; - FilesystemNode(AbstractFilesystemNode *realNode); public: @@ -136,14 +135,14 @@ public: * that does not represent a directory, false is returned. * * @return true if succesful, false otherwise (e.g. when the directory does not exist). - * @todo Rename this to listChildren or getChildren. */ - virtual bool getChildren(FSList &fslist, ListMode mode = kListDirectoriesOnly) const; + virtual bool getChildren(FSList &fslist, ListMode mode = kListDirectoriesOnly, bool hidden = false) const; /** * Return a human readable string for this node, usable for display (e.g. * in the GUI code). Do *not* rely on it being usable for anything else, * like constructing paths! + * * @return the display name */ virtual Common::String getDisplayName() const; -- cgit v1.2.3