2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 23:09:55 -04:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "DiscIO/Filesystem.h"
|
2008-12-08 05:30:24 +00: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 05:30:24 +00:00
|
|
|
|
2018-06-02 18:14:42 +02:00
|
|
|
} // namespace DiscIO
|