2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:09:55 -06:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 22:30:24 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DiscIO/Filesystem.h"
|
2008-12-07 22:30:24 -07:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2017-06-13 15:05:30 -06:00
|
|
|
FileInfo::~FileInfo() = default;
|
2015-07-28 08:56:25 -06:00
|
|
|
|
2018-06-02 10:14:42 -06: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 15:05:30 -06:00
|
|
|
FileSystem::~FileSystem() = default;
|
2008-12-07 22:30:24 -07:00
|
|
|
|
2018-06-02 10:14:42 -06:00
|
|
|
} // namespace DiscIO
|