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

class  Path
 路径。 更多...
 
class  FileList
 文件列表模块。 更多...
 

类型定义

typedef GSStringTemplate
< NativePathCharType >
::basic_string 
NativeString
 本机字符串。
 

函数

const auto CP_Path (Text::CS_Default)
 路径编码。
 
bool operator== (const Path &x, const Path &y)
 
bool operator!= (const Path &x, const Path &y)
 
bool operator< (const Path &x, const Path &y)
 
bool operator<= (const Path &x, const Path &y)
 
bool operator> (const Path &x, const Path &y)
 
bool operator>= (const Path &x, const Path &y)
 
Path operator/ (const Path &x, const Path &y)
 
void swap (Path &x, Path &y)
 交换。
 
YF_API const char * GetFileNameOf (const_path_t)
 截取路径末尾的文件名。
 
YF_API string GetFileNameOf (const string &)
 截取路径末尾的文件名。
 
YF_API string GetDirectoryNameOf (const string &)
 截取路径中的目录名并返回字符串。
 
YF_API string::size_type SplitPath (const string &, string &, string &)
 截取路径中的目录名和文件名保存至字符串,并返回最后一个目录分隔符的位置。
 
YF_API string GetStemOf (const string &)
 截取文件名开头的主文件名。
 
YF_API bool IsStemOf (const char *, const char *)
 对于两个字符串,判断前者是否是后者的主文件名。
 
YF_API bool IsStemOf (const string &, const string &)
 对于两个字符串,判断前者是否是后者的主文件名。
 
YF_API bool HaveSameStems (const char *, const char *)
 判断指定两个文件名的主文件名是否相同。
 
YF_API bool HaveSameStems (const string &, const string &)
 判断指定两个文件名的主文件名是否相同。
 
YF_API const char * GetExtensionOf (const char *)
 截取文件名末尾的扩展名。
 
YF_API string GetExtensionOf (const string &)
 截取文件名末尾的扩展名。
 
YF_API bool IsExtensionOf (const char *, const char *)
 对于两个字符串,判断前者是否是后者的扩展名。
 
YF_API bool IsExtensionOf (const string &, const string &)
 对于两个字符串,判断前者是否是后者的扩展名。
 
YF_API bool HaveSameExtensions (const char *, const char *)
 判断指定两个文件名的扩展名是否相同。
 
YF_API bool HaveSameExtensions (const string &, const string &)
 判断指定两个文件名的扩展名是否相同。
 
int ChangeDirectory (const_path_t path)
 切换路径。
 
YF_API int ChangeDirectory (const string &)
 切换路径。
 
YF_API String GetNowDirectory ()
 取当前工作目录。
 
YF_API bool ValidatePath (const string &)
 验证绝对路径有效性。
 
bool ValidatePath (const Path &path)
 验证绝对路径有效性。
 
yconstexpr const_path_t FS_Root (YCL_PATH_ROOT)
 文件系统常量:前缀 FS 表示文件系统 (File System) 。
 
yconstexpr const_path_t FS_Seperator (YCL_PATH_SEPERATOR)
 
yconstexpr const_path_t FS_Now (".")
 
yconstexpr const_path_t FS_Parent ("..")
 
yconstexpr const ucs2_t * FS_Now_X (u".")
 
yconstexpr const ucs2_t * FS_Parent_X (u"..")
 

类型定义说明

typedef GSStringTemplate<NativePathCharType>::basic_string YSLib::IO::NativeString

本机字符串。

自从
build 285

在文件 yfilesys.h58 行定义.

函数说明

int YSLib::IO::ChangeDirectory ( const_path_t  path)
inline

切换路径。

在文件 yfilesys.h528 行定义.

参考 platform::uchdir().

函数调用图:

YF_API int YSLib::IO::ChangeDirectory ( const string &  )

切换路径。

const auto YSLib::IO::CP_Path ( Text::CS_Default  )

路径编码。

参考自 YSLib::IO::FileList::ListItems().

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

yconstexpr const_path_t YSLib::IO::FS_Now ( "."  )
yconstexpr const ucs2_t* YSLib::IO::FS_Now_X ( u"."  )
yconstexpr const_path_t YSLib::IO::FS_Parent ( ".."  )

参考自 YSLib::IO::FileList::ListItems() , 以及 YSLib::IO::Path::operator/=().

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

yconstexpr const ucs2_t* YSLib::IO::FS_Parent_X ( u".."  )
yconstexpr const_path_t YSLib::IO::FS_Root ( YCL_PATH_ROOT  )

文件系统常量:前缀 FS 表示文件系统 (File System) 。

自从
build 285
yconstexpr const_path_t YSLib::IO::FS_Seperator ( YCL_PATH_SEPERATOR  )

参考自 YSLib::IO::Path::GetRootDirectory() , 以及 YSLib::IO::FileList::ListItems().

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

YF_API string YSLib::IO::GetDirectoryNameOf ( const string &  )

截取路径中的目录名并返回字符串。

YF_API const char* YSLib::IO::GetExtensionOf ( const char *  )

截取文件名末尾的扩展名。

注解
非贪婪匹配。

在文件 yfilesys.cpp278 行定义.

参考自 HaveSameExtensions(),HaveSameStems() , 以及 IsExtensionOf().

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

YF_API string YSLib::IO::GetExtensionOf ( const string &  )

截取文件名末尾的扩展名。

注解
非贪婪匹配。
YF_API const char* YSLib::IO::GetFileNameOf ( const_path_t  )

截取路径末尾的文件名。

参考自 YSLib::Drawing::FontCache::LoadTypefaces().

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

YF_API string YSLib::IO::GetFileNameOf ( const string &  )

截取路径末尾的文件名。

YF_API String YSLib::IO::GetNowDirectory ( )

取当前工作目录。

注解
不含结尾分隔符。
自从
build 304

在文件 yfilesys.cpp360 行定义.

参考 platform::u16getcwd_n() , 以及 YCL_MAX_PATH_LENGTH.

函数调用图:

YF_API string YSLib::IO::GetStemOf ( const string &  )

截取文件名开头的主文件名。

注解
贪婪匹配。
YF_API bool YSLib::IO::HaveSameExtensions ( const char *  ,
const char *   
)

判断指定两个文件名的扩展名是否相同。

注解
忽略大小写;非贪婪匹配。

在文件 yfilesys.cpp314 行定义.

参考 GetExtensionOf().

函数调用图:

YF_API bool YSLib::IO::HaveSameExtensions ( const string &  ,
const string &   
)

判断指定两个文件名的扩展名是否相同。

注解
忽略大小写;非贪婪匹配。
YF_API bool YSLib::IO::HaveSameStems ( const char *  ,
const char *   
)

判断指定两个文件名的主文件名是否相同。

注解
忽略大小写;贪婪匹配。

在文件 yfilesys.cpp257 行定义.

参考 GetExtensionOf() , 以及 yunseq().

函数调用图:

YF_API bool YSLib::IO::HaveSameStems ( const string &  ,
const string &   
)

判断指定两个文件名的主文件名是否相同。

注解
忽略大小写;贪婪匹配。
YF_API bool YSLib::IO::IsExtensionOf ( const char *  ,
const char *   
)

对于两个字符串,判断前者是否是后者的扩展名。

在文件 yfilesys.cpp296 行定义.

参考 GetExtensionOf().

函数调用图:

YF_API bool YSLib::IO::IsExtensionOf ( const string &  ,
const string &   
)

对于两个字符串,判断前者是否是后者的扩展名。

YF_API bool YSLib::IO::IsStemOf ( const char *  ,
const char *   
)

对于两个字符串,判断前者是否是后者的主文件名。

在文件 yfilesys.cpp240 行定义.

参考 ystdex::strlen_n().

函数调用图:

YF_API bool YSLib::IO::IsStemOf ( const string &  ,
const string &   
)

对于两个字符串,判断前者是否是后者的主文件名。

bool YSLib::IO::operator!= ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h386 行定义.

Path YSLib::IO::operator/ ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h411 行定义.

bool YSLib::IO::operator< ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h391 行定义.

参考 YSLib::IO::Path::GetNativeString().

函数调用图:

bool YSLib::IO::operator<= ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h396 行定义.

bool YSLib::IO::operator== ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h381 行定义.

参考 YSLib::IO::Path::GetNativeString().

函数调用图:

bool YSLib::IO::operator> ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h400 行定义.

bool YSLib::IO::operator>= ( const Path &  x,
const Path &  y 
)
inline

在文件 yfilesys.h405 行定义.

YF_API string::size_type YSLib::IO::SplitPath ( const string &  ,
string &  ,
string &   
)

截取路径中的目录名和文件名保存至字符串,并返回最后一个目录分隔符的位置。

void YSLib::IO::swap ( Path &  x,
Path &  y 
)
inline

交换。

在文件 yfilesys.h420 行定义.

YF_API bool YSLib::IO::ValidatePath ( const string &  )

验证绝对路径有效性。

自从
build 298
bool YSLib::IO::ValidatePath ( const Path &  path)
inline

验证绝对路径有效性。

自从
build 298

在文件 yfilesys.h557 行定义.

参考 YSLib::IO::Path::GetNativeString() , 以及 ValidatePath().

函数调用图: