ctr_Repair/trunk/CardSaveData/common/savefile/sdmcwo.h

62 lines
1.6 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.
*---------------------------------------------------------------------------*/
//ライトのみアーカイブ使用
#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:
s64 FileSize;
nn::Result LastNnResult;
char DirName[16];
private:
tArcInfo m_info;
std::wstring GetDateName();
std::wstring DateDirName;
nn::fs::FileWriter writer;
public:
Sdmcwo();
~Sdmcwo();
void Finalize();
bool Create();
myResult Mount();
void Unmount();
bool Delete();
bool DeleteAll();
void CloseW();
bool OpenW(wchar_t *path,s64 size,bool *mkdir);
bool OpenVnfW(wchar_t *path,s64 size);
void GetRootPath(wchar_t *path);
s32 Write(char *buffer,size_t size);
bool WriteSys(tArcInfo *ifo);
};
//Fat違反パス格納データのヘッダ
//直後にデータ配置
//Header+Data,、Header+Data ... と連続して追記してゆく
typedef struct{
wchar_t path[MAX_PATH_LENGTH];
s64 size;
}tVnf;
#endif