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

平台相关的文件系统接口。 更多...

#include "ycommon.h"
#include <dirent.h>
FileSystem.h 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

浏览源代码.

exception  platform::HFileNode
 文件系统节点迭代器。 更多...
 

命名空间

namespace  platform
 默认平台命名空间。
 
namespace  platform_ex
 

宏定义

#define YCL_MAX_PATH_LENGTH   256
 
#define YCL_MAX_FILENAME_LENGTH   YCL_MAX_PATH_LENGTH
 
#define YCL_PATH_DELIMITER   '/'
 文件路径分隔符。
 
#define YCL_PATH_SEPERATOR   "/"
 文件路径分隔字符串。
 
#define YCL_PATH_ROOT   YCL_PATH_SEPERATOR
 根目录路径。
 

类型定义

typedef char platform::NativePathCharType
 本机路径字符类型。
 
typedef NativePathCharType platform::PATHSTR [256]
 本机路径字符串类型。
 
typedef NativePathCharType platform::FILENAMESTR [256]
 本机文件名类型。
 

函数

int platform::uopen (const char *filename, int oflag) ynothrow
 以 UTF-8 文件名无缓冲打开文件。
 
int platform::uopen (const char *filename, int oflag, int pmode) ynothrow
 以 UTF-8 文件名无缓冲打开文件。
 
int platform::uopen (const char16_t *filename, int oflag) ynothrow
 以 UCS-2LE 文件名无缓冲打开文件。
 
int platform::uopen (const char16_t *filename, int oflag, int pmode) ynothrow
 以 UCS-2LE 文件名无缓冲打开文件。
 
std::FILE * platform::ufopen (const char *filename, const char *mode) ynothrow
 以 UTF-8 文件名打开文件。
 
std::FILE * platform::ufopen (const char16_t *filename, const char16_t *mode) ynothrow
 以 UCS-2LE 文件名打开文件。
 
bool platform::ufexists (const char *) ynothrow
 判断指定 UTF-8 文件名的文件是否存在。
 
bool platform::ufexists (const char16_t *) ynothrow
 判断指定 UCS-2 文件名的文件是否存在。
 
template<class _tString >
bool platform::ufexists (const _tString &str) ynothrow
 判断指定字符串为文件名的文件是否存在。
 
bool platform::direxists (const_path_t) ynothrow
 判断指定路径的目录是否存在。
 
bool platform::udirexists (const_path_t) ynothrow
 判断指定 UTF-8 路径的目录是否存在。
 
template<class _tString >
bool platform::udirexists (const _tString &str) ynothrow
 判断指定字符串为文件名的文件是否存在。
 
char * platform::getcwd_n (char *buf, std::size_t size) ynothrow
 当第一参数非空时取当前工作目录复制至指定缓冲区中。
 
char16_t * platform::u16getcwd_n (char16_t *buf, std::size_t size) ynothrow
 当第一参数非空时取当前工作目录( UCS2-LE 编码)复制至指定缓冲区中。
 
int platform::uchdir (const_path_t) ynothrow
 切换当前工作路径至指定的 UTF-8 字符串。
 
bool platform::mkdirs (const_path_t) ynothrow
 按路径新建一个或多个目录。
 
bool platform::truncate (std::FILE *, std::size_t) ynothrow
 截断文件至指定长度。
 
bool platform::IsAbsolute (const_path_t)
 判断指定路径字符串是否表示一个绝对路径。
 
std::size_t platform::GetRootNameLength (const_path_t)
 取指定路径的文件系统根节点名称的长度。
 

详细描述

平台相关的文件系统接口。

版本
r567
作者
FrankHB frank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com
自从
build 312
创建时间:
2012-05-30 22:38:37 +0800
修改时间:
2013-03-02 07:19 +0800
文本编码:
UTF-8
模块名称:
YCLib::FileSystem

在文件 FileSystem.h 中定义.

宏定义说明

#define YCL_MAX_FILENAME_LENGTH   YCL_MAX_PATH_LENGTH

在文件 FileSystem.h58 行定义.

#define YCL_MAX_PATH_LENGTH   256

在文件 FileSystem.h51 行定义.

参考自 ChangeDirectory() , 以及 GetNowDirectory().

#define YCL_PATH_DELIMITER   '/'

文件路径分隔符。

自从
build 298

在文件 FileSystem.h66 行定义.

参考自 GetDirectoryNameOf(),GetFileNameOf(),platform::mkdirs() , 以及 SplitPath().

#define YCL_PATH_ROOT   YCL_PATH_SEPERATOR

根目录路径。

在文件 FileSystem.h74 行定义.

#define YCL_PATH_SEPERATOR   "/"

文件路径分隔字符串。

在文件 FileSystem.h70 行定义.