Shinmera / file-attributes

Access to common file attributes (uid, gid, permissions, ctime, mtime, atime)
https://shinmera.github.io/file-attributes
zlib License
13 stars 2 forks source link

#5 Read/write directory times on Windows #6

Closed jaredkrinke closed 7 months ago

jaredkrinke commented 7 months ago

This fixes #5, making it possible to read/write directory times on Windows. According to MSDN, FILE_FLAG_BACKUP_SEMANTICS is necessary to open a directory handle via CreateFile.

The change only updates the code path for times just to be conservative.

I tested the fix on an NTFS volume on Windows 10. I did not test against FAT/FAT32.

Shinmera commented 7 months ago

Thanks!