ctr_Repair/branches/CardCupForNBD/CardSaveData/common/savefile/sdmcwo.h
N2614 b6024ff808 セルフCUPツール NBDリリース向けブランチ
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_Repair@337 385bec56-5757-e545-9c3a-d8741f4650f1
2011-06-14 00:36:31 +00:00

64 lines
1.9 KiB
C++

/*---------------------------------------------------------------------------*
Project: Horizon
Copyright (C)2009 Nintendo Co., Ltd. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
*---------------------------------------------------------------------------*/
//SDKツールのSaveFilerで読める形式でsdmcダイレクトで書き出す
//リードはしない
#ifndef sdmcwo_H_
#define sdmcwo_H_
#include <sstream>
#include <nn/types.h>
#include <nn/Result.h>
#include "../my_defs.h"
#include "savefile.h"
class Sdmcwo: public SaveFileWrite
{
public:
char DirName[16];
private:
bool DelDir(const wchar_t *dir);
std::wstring GetDateName();
std::wstring DateDirName;
wchar_t latestPath_w[MAX_PATH_LENGTH];//dev:filer/UserSaveData/YearMtDtHrMtSc
wchar_t rootPath_w[MAX_PATH_LENGTH];//dev:/filer/UserSaveData/YearMtDtHrMtSc/00000000/
bool created;
char dummy[3];
public:
bool MountCore()
{
LastNnResult = nn::fs::MountSdmcWriteOnly(devName);
return LastNnResult.IsSuccess();
}
bool GetFreeSize(s64 *size);
void Finalize(){CloseW();};
bool Create();
bool Delete();
bool DeleteAll();
bool OpenVnfW(wchar_t *path,s64 size);
bool WriteSys(tArcInfo *ifo);
Sdmcwo(){strcpy(devName,"sdmcwo:");};
~Sdmcwo(){Finalize();};
};
//Fat違反パス格納データのヘッダ
//直後にデータ配置
//Header+Data,、Header+Data ... と連続して追記してゆく
typedef struct{
wchar_t path[MAX_PATH_LENGTH];
s64 size;
}tVnf;
#endif