YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YSLib::IO 命名空间参考

class  Path
 路径。 更多...
 
class  PathNorm
 文件路径范式。 更多...
 

类型定义

using ypath = ystdex::path< vector< String >, PathNorm >
 

函数

 PDefH (String, GetExtensionOf, const string &path) ImplRet(String(path
 
String GetExtensionOf (const String &fname)
 
String FetchCurrentWorkingDirectory (size_t len)
 
bool VerifyDirectory (const char *path)
 
void EnsureDirectory (const Path &pth)
 
void ListFiles (const Path &pth, vector< String > &lst)
 
PathCategory ClassifyPath (const String &fname, ypath::norm &&norm)
 
CS_Path PDefH(String,
GetExtensionOf, const Path
&pth) ImplRet(pth.empty()?String() 
PDefH (bool, IsAbsolute, const string &path) ImplRet(IsAbsolute(path.c_str())) inline PDefH(bool
 取当前工作目录。 更多...
 
CS_Path PDefH(String,
GetExtensionOf, const Path
&pth) ImplRet(pth.empty()?String() 
IsAbsolute
 
CS_Path PDefH(String,
GetExtensionOf, const Path
&pth) ImplRet(pth.empty()?String()
const String &path 
ImplRet (IsAbsolute(path.GetMBCS(CS_Path))) inline PDefH(bool
 判断路径表示相对路径(包括空路径)。 更多...
 
CS_Path PDefH(String,
GetExtensionOf, const Path
&pth) ImplRet(pth.empty()?String()
const String &path const Path
&pth 
IsRelative
 
 VerifyDirectory
 
const String &path const Path
&pth ImplRet(!pth.empty()&&VerifyDirectory(pth.GetString()))
YF_API void EnsureDirectory(const
Path &) ythrow(std PDefH(void,
EnsureDirectory, const char
*path) ythrow(std YF_API
PathCategor 
ClassifyPath )(const String &, ypath::norm &&=PathNorm())
 验证路径表示的目录是否存在,若不存在则逐级创建。 更多...
 
 PDefH (bool, VerifyDirectory, const string &path) ImplRet(VerifyDirectory(path.c_str())) inline PDefH(bool
 
const String &path ImplRet (VerifyDirectory(path.GetMBCS(CS_Path))) inline PDefH(bool
 
YF_API NodeCategory ClassifyNode (const Path &)
 按文件系统节点类别对路径分类。 更多...
 

类型定义说明

using YSLib::IO::ypath = typedef ystdex::path<vector<String>, PathNorm>
自从
build 409

在文件 YSLib/Service/FileSystem.h68 行定义.

函数说明

NodeCategory YSLib::IO::ClassifyNode ( const Path &  pth)

按文件系统节点类别对路径分类。

在文件 YSLib/Service/FileSystem.cpp186 行定义.

参考 ClassifyPath(), ystdex::path< _tSeqCon, _tNorm >::get_norm(), platform::ufexists() , 以及 VerifyDirectory().

函数调用图:

PathCategory YSLib::IO::ClassifyPath ( const String &  fname,
ypath::norm &&  norm 
)

在文件 YSLib/Service/FileSystem.cpp174 行定义.

参考 YB_UNLIKELY.

参考自 ClassifyNode().

这是这个函数的调用关系图:

void YSLib::IO::EnsureDirectory ( const Path &  pth)

在文件 YSLib/Service/FileSystem.cpp138 行定义.

参考 YSLib::UI::name, CHRLib::strdup(), platform::umkdir(), VerifyDirectory() , 以及 YAssert.

函数调用图:

String YSLib::IO::FetchCurrentWorkingDirectory ( size_t  len)

在文件 YSLib/Service/FileSystem.cpp113 行定义.

参考 platform::u16getcwd_n().

函数调用图:

String YSLib::IO::GetExtensionOf ( const String &  fname)

在文件 YSLib/Service/FileSystem.cpp99 行定义.

const String& path YSLib::IO::ImplRet ( VerifyDirectory(path.GetMBCS(CS_Path))  )
void YSLib::IO::ListFiles ( const Path &  pth,
vector< String > &  lst 
)
YSLib::IO::PDefH ( String  ,
GetExtensionOf  ,
const string &  path 
)
inline
自从
build 476
YSLib::IO::PDefH ( bool  ,
VerifyDirectory  ,
const string &  path 
)
inline
bool YSLib::IO::VerifyDirectory ( const char *  path)

在文件 YSLib/Service/FileSystem.cpp123 行定义.

参考自 ClassifyNode(), EnsureDirectory() , 以及 YSLib::IO::Path::operator String().

这是这个函数的调用关系图:

变量说明

const String& path const Path& pth ImplRet (!pth.empty() && VerifyDirectory(pth.GetString())) YF_API void EnsureDirectory( const Path&) ythrow(std PDefH (void, EnsureDirectory, const char* path) ythrow(std YF_API PathCategor YSLib::IO::ClassifyPath)(const String &, ypath::norm &&=PathNorm())
inline

验证路径表示的目录是否存在,若不存在则逐级创建。

后置条件
断言:使用 VerifyDirectory 验证目录存在。
异常
std::system_error失败时根据 errno 抛出的异常。
注解
使用 umkdir 实现。
自从
build 476

遍历目录中的项目,更新至列表。

自从
build 414

按路径类别对路径成员分类。

自从
build 411

在文件 YSLib/Service/FileSystem.h354 行定义.

CS_Path PDefH (String, GetExtensionOf, const Path& pth) ImplRet(pth.empty() ? String() const String& path const Path& pth const char* path const string& path const String& path const Path& pth YSLib::IO::ImplRet(!IsAbsolute(pth))YF_API bool VerifyDirectory(const char *)

判断路径表示相对路径(包括空路径)。

验证路径表示的目录是否存在。

在文件 YSLib/Service/FileSystem.h288 行定义.

CS_Path PDefH (String, GetExtensionOf, const Path& pth) ImplRet(pth.empty() ? String() const String& path YSLib::IO::IsAbsolute

在文件 YSLib/Service/FileSystem.h287 行定义.

CS_Path PDefH (String, GetExtensionOf, const Path& pth) ImplRet(pth.empty() ? String() const String& path const Path& pth const char* path const string& path const String& path YSLib::IO::IsRelative

在文件 YSLib/Service/FileSystem.h295 行定义.

CS_Path YSLib::IO::PDefH
inline

取当前工作目录。

验证路径表示的目录是否存在。

判断路径表示相对路径(包括空路径)。

后置条件
结果长度不大于参数。
注解
不含结尾分隔符。
自从
build 475
build 410 判断路径表示绝对路径。

在文件 YSLib/Service/FileSystem.h285 行定义.

const String &path YSLib::IO::VerifyDirectory