YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
YCLib/FileSystem.h 文件参考
#include "YModules.h"
#include <YCLib/ycommon.h>
#include <ystdex/utility.hpp>
#include <ystdex/cstring.h>
#include <ystdex/string.hpp>
#include "CHRLib/encoding.h"
#include <ystdex/iterator.hpp>
YCLib/FileSystem.h 的引用(Include)关系图:

浏览源代码.

class  platform::FileOperationFailure
 表示文件操作失败的异常。 更多...
 
class  platform::DirectorySession
 目录会话:表示打开的目录。 更多...
 
class  platform::HDirectory
 目录句柄:表示打开的目录和内容迭代状态。 更多...
 

命名空间

 platform
 默认平台命名空间。
 
 platform_ex
 平台扩展命名空间。
 

宏定义

#define YCL_FS_StringIsCurrent(_s, _p)   (ystdex::string_length(_s) == 1 && _s[0] == YPP_Concat(_p, '.'))
 
#define YCL_FS_StringIsParent(_s, _p)
 

类型定义

using platform::FileIterator = ystdex::indirect_input_iterator< HDirectory * >
 文件迭代器。 更多...
 

枚举

enum  platform::PathCategory : yimpl(std::uint32_t) { platform::PathCategory::Empty, platform::PathCategory::Self, platform::PathCategory::Parent, platform::PathCategory::Node }
 路径类别。 更多...
 
enum  platform::NodeCategory : ystdex::underlying_type_t< PathCategory > {
  platform::NodeCategory::Empty = ystdex::underlying_type_t<PathCategory>(PathCategory::Empty), platform::NodeCategory::Unknown = ystdex::underlying_type_t<PathCategory>(PathCategory::Node), platform::NodeCategory::Missing, platform::NodeCategory::Invalid,
  platform::NodeCategory::Regular, platform::NodeCategory::Directory, platform::NodeCategory::Device = 0x1000, platform::NodeCategory::Block,
  platform::NodeCategory::Character, platform::NodeCategory::yimpl, platform::NodeCategory::FIFO, platform::NodeCategory::Socket,
  platform::NodeCategory::yimpl, platform::NodeCategory::SymbolicLink, platform::NodeCategory::HardLink, platform::NodeCategory::Junction,
  platform::NodeCategory::Special = 0x4000, platform::NodeCategory::yimpl =()
}
 文件系统节点类别。 更多...
 

函数

YF_API int platform::uopen (const char *filename, int oflag) ynothrow
 以 UTF-8 文件名无缓冲打开文件。 更多...
 
YF_API int platform::uopen (const char *filename, int oflag, int pmode) ynothrow
 以 UTF-8 文件名无缓冲打开文件。 更多...
 
YF_API int platform::uopen (const char16_t *filename, int oflag) ynothrow
 以 UCS-2 文件名无缓冲打开文件。 更多...
 
YF_API int platform::uopen (const char16_t *filename, int oflag, int pmode) ynothrow
 以 UCS-2 文件名无缓冲打开文件。 更多...
 
YF_API std::FILE * platform::ufopen (const char *filename, const char *mode) ynothrow
 以 UTF-8 文件名打开文件。 更多...
 
YF_API std::FILE * platform::ufopen (const char16_t *filename, const char16_t *mode) ynothrow
 以 UCS-2 文件名打开文件。 更多...
 
YF_API bool platform::ufexists (const char *) ynothrow
 判断指定 UTF-8 文件名的文件是否存在。 更多...
 
YF_API bool platform::ufexists (const char16_t *) ynothrow
 判断指定 UCS-2 文件名的文件是否存在。 更多...
 
template<class _tString >
 platform::PDefH (bool, ufexists, const _tString &str) ynothrow ImplRet(ufexists(str.c_str())) YF_API char16_t *u16getcwd_n(char16_t *buf
 判断指定字符串为文件名的文件是否存在。 更多...
 
YF_API bool platform::IsAbsolute (const char *)
 判断指定路径字符串是否表示一个绝对路径。 更多...
 
YF_API std::size_t platform::GetRootNameLength (const char *)
 取指定路径的文件系统根节点名称的长度。 更多...
 
char16_t platform_ex::FS_IsRoot (const char16_t *)
 
YF_API bool platform::uchdir (const char *) ynothrow
 切换当前工作路径至指定的 UTF-8 字符串。 更多...
 
YF_API bool platform::umkdir (const char *) ynothrow
 按 UTF-8 路径以默认权限新建一个目录。 更多...
 
YF_API bool platform::urmdir (const char *) ynothrow
 按 UTF-8 路径删除一个空目录。 更多...
 
YF_API bool platform::uunlink (const char *) ynothrow
 按 UTF-8 路径删除一个非目录文件。 更多...
 
YF_API bool platform::uremove (const char *) ynothrow
 按 UTF-8 路径删除一个文件。 更多...
 
YF_API bool platform::truncate (std::FILE *, std::size_t) ynothrow
 截断文件至指定长度。 更多...
 
YF_API std::uint64_t platform::GetFileSizeOf (int)
 取文件的大小。 更多...
 
YF_API std::uint64_t platform::GetFileSizeOf (std::FILE *)
 

变量

std::size_t size platform::ynothrow
 

宏定义说明

#define YCL_FS_StringIsCurrent (   _s,
  _p 
)    (ystdex::string_length(_s) == 1 && _s[0] == YPP_Concat(_p, '.'))

在文件 YCLib/FileSystem.h52 行定义.

#define YCL_FS_StringIsParent (   _s,
  _p 
)
值:
&& _s[0] == YPP_Concat(_p, '.') && _s[1] == YPP_Concat(_p, '.'))
#define YPP_Concat(x, y)
Definition: ydef.h:163
size_t string_length(const _tChar *str)
计算字符串长度。
Definition: string.hpp:86

在文件 YCLib/FileSystem.h59 行定义.