I am a beginner learning Win32 Local FileSystems to better deal with files on Windows.
In the article (Naming Files, Paths, and Namespaces)[https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file](https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file], it is said the some reserved file names, such as COM1, CON, and NUL, are prohibited to use. Even files whose names start with the same one in those reserved names and immediately followed by extension name(s) are equivalent, such as NUL and NUL.txt .
To get a deeper understanding of paths, I read https://projectzero.google/2016/02/the-definitive-guide-on-win32-to-nt.html?utm_source=chatgpt.com. But things get a little bit weird as it and MSLearn Document both described.
1
First, though NUL is prohibited to create in file explorer, but NUL.txt is still allowed to create. However, it cannot be opened normally, for instance using VSCode to access it results in a default welcome window, instead of a document window.
2
Second, I recently created a NTFS volume F: with a capacity of 100MB to test filesystem behaviors. I created F:\NUL.txt, and used powershell instruction cat <a_30MB_zip_file> > F:\NUL.txt to write data to it. Powershell raised an error half the way, and said that there's no enough space to write. Checking what's going on in the File Explorer, I surprisely found out that Volume F:/ has 0 byte left, while NUL.txt has a size of about 40MB. I expected the behavior was like no matter how much data I wrote to it, the actual size would be 0.

3
Third, when I use the code https://projectzero.google/2016/02/the-definitive-guide-on-win32-to-nt.html?utm_source=chatgpt.com provided at the bottom of the website, I found out that a reserved file name suffixed by an extension name cannot be parsed to the corresponding NT Path: CON.txt C:\CON.txt C:CON.txt \CON.txt are converted just like normal files. And that is different from what It should be like as the second chart in the "Local Device" section of https://projectzero.google/2016/02/the-definitive-guide-on-win32-to-nt.html?utm_source=chatgpt.com.
CON.txt
RelativeName: 'CON.txt'
Directory: 0x64
CurDirRef: 0x1ABD9D19660
FullPathName: 'D:\Development\ConsoleApp1\ConsoleApp1\bin\Debug\net10.0\CON.txt'
/CON.txt
Converting: '/CON.txt'
To: '\??\D:\CON.txt'
Type: RtlPathTypeRooted
FileName: CON.txt
FullPathName: 'D:\CON.txt'
C:/CON.txt
Converting: 'C:/CON.txt'
To: '\??\C:\CON.txt'
Type: RtlPathTypeDriveAbsolute
FileName: CON.txt
FullPathName: 'C:\CON.txt'
C:CON.txt
Converting: 'C:CON.txt'
To: '\??\C:\CON.txt'
Type: RtlPathTypeDriveRelative
FileName: CON.txt
FullPathName: 'C:\CON.txt'
(pls ignore that I used forward slash. The same things happened when I used backslash in their paths)
Since they are equivanlent to CON, I expected them to behave like CON -- translated to \??\CON
Is this just a misbehavior, or an internal implementation that ordinary users and win32 developers should not focus on? (but I think there will be some guys who will try to create NUL.txt -- we've got billions of WIndows users)
OS: Win11 Chinese Simplified Home Insider Preview (25H2 26220.9202)