Missed a few changes in the last commit.

This commit is contained in:
Stephen Anthony 2022-07-10 18:49:59 -02:30
parent 94e103e604
commit 47b0287d5a
3 changed files with 7 additions and 10 deletions

View File

@ -124,6 +124,9 @@ AbstractFSNodePtr FSNodeREGULAR::getParent() const
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FSNodeREGULAR::getChildren(AbstractFSList& myList, ListMode mode) const
{
if (!_isDirectory)
return false;
std::error_code ec;
for (const auto& entry: fs::directory_iterator{_fspath,
fs::directory_options::follow_directory_symlink |

View File

@ -66,7 +66,7 @@ class FSNodeREGULAR : public AbstractFSNode
AbstractFSNodePtr getParent() const override;
bool getChildren(AbstractFSList& list, ListMode mode) const override;
protected:
private:
fs::path _fspath;
string _path, _displayName;
bool _isFile{false}, _isDirectory{false},

View File

@ -242,7 +242,7 @@ class FSNode
/**
* Get the size of the current node path.
*
* @return Size (in bytes) of the current node path.
* @return Size in bytes of the current node path (if a file), else 0.
*/
size_t getSize() const;
@ -356,14 +356,8 @@ class AbstractFSNode
virtual bool getChildren(AbstractFSList& list, ListMode mode) const = 0;
/**
* Returns the last component of the path pointed by this FSNode.
*
* Examples (POSIX):
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
*
* @note This method is very architecture dependent, please check the concrete
* implementation for more information.
* Query/set the name of the node, typically what will be seen in
* various UI elements.
*/
virtual const string& getName() const = 0;
virtual void setName(const string& name) = 0;