Qt/FilesystemWidget: Add size column

This commit is contained in:
spycrab
2018-06-02 18:14:42 +02:00
parent f09f83c309
commit f6865117e4
3 changed files with 36 additions and 5 deletions

View File

@ -8,6 +8,19 @@ namespace DiscIO
{
FileInfo::~FileInfo() = default;
u64 FileInfo::GetTotalSize() const
{
if (!IsDirectory())
return GetSize();
u64 size = 0;
for (const auto& entry : *this)
size += entry.GetTotalSize();
return size;
}
FileSystem::~FileSystem() = default;
} // namespace
} // namespace DiscIO