added a few comment that they are talk about filename length limited.
This commit is contained in:
@@ -46,7 +46,20 @@ namespace hgl
|
||||
bool GetCurrentProgramPath(OSString &); ///<取得当前程序所在路径
|
||||
bool GetLocalAppdataPath(OSString &); ///<取得当前用户应用程序数据存放路径
|
||||
|
||||
//使用int64而不是__int64是因为不是所有编译器都支持__int64的写法,必须使用DataType.H中引入的定义
|
||||
/**
|
||||
* 文件名长度限制
|
||||
*
|
||||
* OS | FILENAME | FILENAME+PATHNAME |
|
||||
* ------------------+----------+-------------------+
|
||||
* Windows 256 260
|
||||
* Windows 10(>1607) 32767 32767 // max length must get from lpMaximumComponentLength of GetVolumeInformation
|
||||
* // https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=powershell
|
||||
*
|
||||
* MacOS/Solaris/AIX 255 1024
|
||||
* Linux 255 1024/4096
|
||||
*/
|
||||
|
||||
//使用int64而不是__int64是因为不是所有编译器都支持__int64的写法,必须使用DataType.h中引入的定义
|
||||
|
||||
/**
|
||||
* 文件信息数据结构
|
||||
|
@@ -46,7 +46,12 @@ using os_char =wchar_t;
|
||||
#define HGL_LINE_END OS_TEXT("\r\n") //换行符
|
||||
#define HGL_LINE_END_SIZE 2 //换行符长度
|
||||
|
||||
#define HGL_MAX_PATH MAX_PATH
|
||||
/**
|
||||
* 从Windows 10(ver 1607)开始,NTFS分区文件名最大长度为32767。
|
||||
* 但由于文件系统的不同,我们需要使用 GetVolumeInformation 函数,根据参数lpMaximumComponentLength的返回值来确定每个分区可使用的最大长度
|
||||
*/
|
||||
|
||||
#define HGL_MAX_PATH MAX_PATH //文件名最大长度
|
||||
|
||||
#define HGL_MEM_ALIGN 16 //内存对齐字节数
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user