I'm developing yet another software for copying data in various configurations. It is important to copy not only data but also all possible attributes available on filesystem. For Windows (most of versions) it works, but for Server 2025 Standard, version 24H2 and build 26100.7171 I observe strange behavior where a new directory has an additional file attribute of 268435456 = 0x1000000, but it is not described on the Microsoft page: https://learn.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants.
This bit persists as long as the directory is untouched. However, adding an entry within it or changing some permissions via right-click, Preferences, and changing Attributes, and then reverting that change causes the directory's file attributes to return to normal (16).
>>> os.mkdir("new")
>>> os.stat("new").st_file_attributes
268435472
>>> os.mkdir("new/not-empty")
>>> os.stat("new").st_file_attributes
16
>>> "%x" % 268435472
'10000010'
Why it is like that?