1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: fs_File.h 4 5 Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 13 $Rev: 28101 $ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_FS_FS_FILE_H_ 17 #define NN_FS_FS_FILE_H_ 18 19 #include <nn/fs/fs_FileStream.h> 20 21 namespace nn { 22 namespace fs { 23 24 // 新たにこのクラスを使わないこと 25 class File : private nn::fs::FileStream 26 { 27 private: 28 typedef FileStream Base; 29 public: File()30 File() {} File(const wchar_t * pathName,bit32 mode,Attributes)31 File( const wchar_t* pathName, bit32 mode, Attributes ) : FileStream(pathName, mode) {} 32 Open(const wchar_t * pathName,bit32 mode,Attributes)33 void Open(const wchar_t* pathName, bit32 mode, Attributes ) { Base::Initialize(pathName, mode); } TryOpen(const wchar_t * pathName,bit32 mode,Attributes)34 nn::Result TryOpen(const wchar_t* pathName, bit32 mode, Attributes) { return Base::TryInitialize(pathName, mode); } 35 using Base::Read; 36 using Base::Write; 37 #pragma push 38 #pragma diag_suppress 997 SetPosition(s64 position,PositionBase base)39 void SetPosition( s64 position, PositionBase base) { Base::Seek(position, base); } 40 #pragma pop 41 using Base::GetPosition; 42 using Base::GetSize; 43 using Base::SetSize; Close()44 void Close() { Base::Finalize(); } 45 46 static void Delete(const wchar_t* pathName); 47 static Result TryDelete(const wchar_t* pathName); 48 49 }; 50 51 } // end of namespace fs 52 } // end of namespace nn 53 54 #include <nn/Handle.h> 55 #include <nn/Result.h> 56 #include <nn/types.h> 57 #include <nn/util/util_Result.h> 58 #include <nn/fs/fs_Parameters.h> 59 #include <nn/fs/fs_Result.h> 60 61 #endif // ifndef NN_FS_FS_FILE_H_ 62