From db80225a973049f77f0a3080aae4bd2ea6084bc4 Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Fri, 28 Oct 2022 01:58:47 -0700 Subject: fs: Some NAME_MAX/MAX_NAME_BYTES improvements --- lib/std/os/windows.zig | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/std/os') diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index 7bed48a2bf..71dfc70d37 100644 --- a/lib/std/os/windows.zig +++ b/lib/std/os/windows.zig @@ -2981,6 +2981,18 @@ pub const PATH_MAX_WIDE = 32767; /// > lpMaximumComponentLength parameter of the GetVolumeInformation function /// > (this value is commonly 255 characters) /// from https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation +/// +/// > The value that is stored in the variable that *lpMaximumComponentLength points to is +/// > used to indicate that a specified file system supports long names. For example, for +/// > a FAT file system that supports long names, the function stores the value 255, rather +/// > than the previous 8.3 indicator. Long names can also be supported on systems that use +/// > the NTFS file system. +/// from https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-getvolumeinformationw +/// +/// The assumption being made here is that while lpMaximumComponentLength may vary, it will never +/// be larger than 255. +/// +/// TODO: More verification of this assumption. pub const NAME_MAX = 255; pub const FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100; -- cgit v1.2.3