You've already forked pico-launcher
mirror of
https://github.com/LNH-team/pico-launcher.git
synced 2026-01-09 16:28:48 -08:00
20 lines
721 B
C++
20 lines
721 B
C++
#include "common.h"
|
|
#include <string.h>
|
|
#include "core/StringUtil.h"
|
|
#include "FileInfo.h"
|
|
|
|
FileInfo::FileInfo(const FileInfo& fileInfo)
|
|
: _type(fileInfo._type), _fastFileRef(fileInfo._fastFileRef)
|
|
{
|
|
u32 bufferLength = strlen(fileInfo.GetFileName()) + 1;
|
|
_name = std::make_unique_for_overwrite<TCHAR[]>(bufferLength);
|
|
StringUtil::Copy(_name.get(), fileInfo.GetFileName(), bufferLength);
|
|
}
|
|
|
|
FileInfo::FileInfo(const TCHAR* fileName, const FileType* type, const FastFileRef& fastFileRef)
|
|
: _type(type), _fastFileRef(fastFileRef)
|
|
{
|
|
u32 bufferLength = strlen(fileName) + 1;
|
|
_name = std::make_unique_for_overwrite<TCHAR[]>(bufferLength);
|
|
StringUtil::Copy(_name.get(), fileName, bufferLength);
|
|
} |