SimpleWindow
载入中...
搜索中...
未找到
sw::Path类 参考

用于处理文件路径的工具类 更多...

#include <Path.h>

静态 Public 成员函数

static std::wstring GetFileName (const std::wstring &path)
 获取文件名
 
static std::wstring GetFileNameWithoutExt (const std::wstring &path)
 获取文件名
 
static std::wstring GetExtension (const std::wstring &path)
 获取扩展名
 
static std::wstring GetDirectory (const std::wstring &path)
 获取文件所在路径
 
static std::wstring Combine (std::initializer_list< std::wstring > paths)
 对路径进行拼接
 
static std::wstring GetAbsolutePath (const std::wstring &path)
 获取路径所对应的绝对路径
 

详细描述

用于处理文件路径的工具类

成员函数说明

◆ Combine()

static std::wstring sw::Path::Combine ( std::initializer_list< std::wstring > paths)
static

对路径进行拼接

参数
paths要拼接的路径
返回
完整的路径

◆ GetAbsolutePath()

static std::wstring sw::Path::GetAbsolutePath ( const std::wstring & path)
static

获取路径所对应的绝对路径

参数
paths要转换的路径
返回
若函数成功则返回绝对路径,否则返回空字符串

◆ GetDirectory()

static std::wstring sw::Path::GetDirectory ( const std::wstring & path)
static

获取文件所在路径

参数
path文件的路径
返回
文件所在路径

◆ GetExtension()

static std::wstring sw::Path::GetExtension ( const std::wstring & path)
static

获取扩展名

参数
path文件的路径
返回
文件的扩展名,不包含前面的点

◆ GetFileName()

static std::wstring sw::Path::GetFileName ( const std::wstring & path)
static

获取文件名

参数
path文件的路径
返回
文件名,包含扩展名

◆ GetFileNameWithoutExt()

static std::wstring sw::Path::GetFileNameWithoutExt ( const std::wstring & path)
static

获取文件名

参数
path文件的路径
返回
文件名,不含扩展名

该类的文档由以下文件生成: