YSTest: File.cpp 源文件

YSTest PreAlpha_b700_20160611 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

File.cpp
浏览该文件的文档.
1 /*
2 © 2009-2015 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #include "YSLib/Service/YModules.h"
29 #include YFM_YSLib_Service_File
30
31 namespace YSLib
32 {
33
34 namespace IO
35 {
36
37 UniqueFile
38 OpenFile(const char* filename, int omode, mode_t pmode)
39 {
40 if(UniqueFile p_ifile{uopen(filename, omode, pmode)})
41 return p_ifile;
42 else
43 ThrowFileOperationFailure("Failed opening file '" + string(filename)
44 + "'.");
45 }
46
47 } // namespace IO;
48
49 } // namespace YSLib;
50
YSLib
YSLib 命名空间。
Definition: AndroidHost.h:45
platform::uopen
int uopen(const char *filename, int oflag, mode_t pmode) ynothrowv
Definition: FileIO.cpp:804
platform::UniqueFile
unique_ptr_from< FileDescriptor::Deleter > UniqueFile
Definition: FileIO.h:427
YSLib::IO::mode_t
YF_API mode_t
Definition: File.h:49
YSLib::IO::OpenFile
UniqueFile OpenFile(const char *filename, int omode, mode_t pmode)
Definition: File.cpp:38
YModules.h
IO
platform::pmode
YF_API int mode_t pmode
Definition: FileIO.h:504