2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 01:22:19 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "DiscIO/Filesystem.h"
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2008-07-12 17:40:22 +00:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-06-13 21:05:30 +00:00
|
|
|
FileInfo::~FileInfo() = default;
|
2015-07-28 14:56:25 +00:00
|
|
|
|
2018-06-02 16:14:42 +00:00
|
|
|
u64 FileInfo::GetTotalSize() const
|
|
|
|
{
|
|
|
|
if (!IsDirectory())
|
|
|
|
return GetSize();
|
|
|
|
|
|
|
|
u64 size = 0;
|
|
|
|
|
|
|
|
for (const auto& entry : *this)
|
|
|
|
size += entry.GetTotalSize();
|
|
|
|
|
|
|
|
return size;
|
|
|
|
}
|
|
|
|
|
2017-06-13 21:05:30 +00:00
|
|
|
FileSystem::~FileSystem() = default;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2018-06-02 16:14:42 +00:00
|
|
|
} // namespace DiscIO
|