2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2008-12-08 06:30:24 +01:00
|
|
|
|
2014-02-17 11:18:15 +01:00
|
|
|
#include "DiscIO/Filesystem.h"
|
2008-12-08 06:30:24 +01:00
|
|
|
|
2008-07-12 19:40:22 +02:00
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-06-13 23:05:30 +02:00
|
|
|
FileInfo::~FileInfo() = default;
|
2015-07-28 16:56:25 +02:00
|
|
|
|
2018-06-02 18:14:42 +02: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 23:05:30 +02:00
|
|
|
FileSystem::~FileSystem() = default;
|
2008-12-08 06:30:24 +01:00
|
|
|
|
2018-06-02 18:14:42 +02:00
|
|
|
} // namespace DiscIO
|