Detect file size in FSNodeWINDOWS.

This commit is contained in:
Stephen Anthony 2022-06-08 18:48:40 -02:30
parent 764a6d66aa
commit df2c8c70d9
2 changed files with 8 additions and 0 deletions

View File

@ -228,6 +228,13 @@ bool FilesystemNodeWINDOWS::
return true;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
size_t FilesystemNodeWINDOWS::getSize() const
{
struct _stat st;
return _stat(_path.c_str(), &st) == 0 ? st.st_size : 0;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
bool FilesystemNodeWINDOWS::makeDir()
{

View File

@ -70,6 +70,7 @@ class FilesystemNodeWINDOWS : public AbstractFSNode
bool makeDir() override;
bool rename(const string& newfile) override;
size_t getSize() const override;
bool getChildren(AbstractFSList& list, ListMode mode) const override;
AbstractFSNodePtr getParent() const override;