NX 1.0.3
niu2x's base c++ helper library
载入中...
搜索中...
未找到
| 类型定义 | 函数 | 变量
nx::file_system 命名空间参考

file_system namespace 更多...

class  Archive
 
class  File
 

类型定义

using GlobCallback = Function< void(const String &path)>
 

函数

NX_API bool is_directory (const String &path)
 Determines whether the specified path is directory.
 
NX_API bool is_file (const String &path)
 Determines whether the specified path is file.
 
NX_API bool exists (const String &path)
 Determines whether the specified file exist
 
NX_API bool make_dirs (const String &path)
 
NX_API String relative_path (const String &path, const String &base)
 
NX_API Vector< Stringlist_dir (const String &path)
 
NX_API String get_parent_path (const String &path)
 Gets the parent path.
 
NX_API String join_path (const String &dir, const String &path)
 
NX_API String get_file_name (const String &path)
 Gets the file name.
 
NX_API Filein ()
 get stdin file
 
NX_API Fileout ()
 get stdout file
 
NX_API Fileerr ()
 get stderr file
 
NX_API ReadAllResult read_file (const String &path)
 
NX_API UniquePtr< Archivecreate_archive (const String &file_uri)
 
NX_API UniquePtr< Archivecreate_zip_archive_from_memory (const void *buf, size_t len)
 
NX_API void glob (const String &directory, const String &glob_pattern, GlobCallback callback)
 
NX_API List< Stringglob (const String &directory, const String &glob_pattern)
 

变量

NX_API const char path_separator
 

详细描述

file_system namespace

类型定义说明

◆ GlobCallback

using nx::file_system::GlobCallback = typedef Function<void(const String& path)>

函数说明

◆ create_archive()

NX_API UniquePtr< Archive > nx::file_system::create_archive ( const String file_uri)

◆ create_zip_archive_from_memory()

NX_API UniquePtr< Archive > nx::file_system::create_zip_archive_from_memory ( const void *  buf,
size_t  len 
)

◆ err()

NX_API File & nx::file_system::err ( )

get stderr file

返回
stderr file

◆ exists()

NX_API bool nx::file_system::exists ( const String path)

Determines whether the specified file exist

参数
[in]pathThe path of file
返回
True if the specified file exist, False otherwise.

◆ get_file_name()

NX_API String nx::file_system::get_file_name ( const String path)

Gets the file name.

参数
[in]pathThe path
返回
The file name.

◆ get_parent_path()

NX_API String nx::file_system::get_parent_path ( const String path)

Gets the parent path.

参数
[in]pathThe path
返回
The parent path.

◆ glob() [1/2]

NX_API List< String > nx::file_system::glob ( const String directory,
const String glob_pattern 
)

◆ glob() [2/2]

NX_API void nx::file_system::glob ( const String directory,
const String glob_pattern,
GlobCallback  callback 
)

◆ in()

NX_API File & nx::file_system::in ( )

get stdin file

返回
stdin file

◆ is_directory()

NX_API bool nx::file_system::is_directory ( const String path)

Determines whether the specified path is directory.

参数
[in]pathThe path
返回
True if the specified path is directory, False otherwise.

◆ is_file()

NX_API bool nx::file_system::is_file ( const String path)

Determines whether the specified path is file.

参数
[in]pathThe path
返回
True if the specified path is file, False otherwise.

◆ join_path()

NX_API String nx::file_system::join_path ( const String dir,
const String path 
)

◆ list_dir()

NX_API Vector< String > nx::file_system::list_dir ( const String path)

◆ make_dirs()

NX_API bool nx::file_system::make_dirs ( const String path)

◆ out()

NX_API File & nx::file_system::out ( )

get stdout file

返回
stdout file

◆ read_file()

NX_API ReadAllResult nx::file_system::read_file ( const String path)

◆ relative_path()

NX_API String nx::file_system::relative_path ( const String path,
const String base 
)

变量说明

◆ path_separator

NX_API const char nx::file_system::path_separator
extern