-
-
Notifications
You must be signed in to change notification settings - Fork 258
Closed
Description
As an improvement to the file-id crate, I would propose change:
Line 195 in 128bf62
| .read(true) |
to:
.access_mode(0)
From https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#files:
The dwDesiredAccess parameter can be zero, allowing the application to query file attributes without accessing the file if the application is running with adequate security settings. This is useful to test for the existence of a file without opening it for read and/or write access, or to obtain other statistics about the file or directory.
For example, currently, I get an error trying to get info for C:\Users\Administrator\AppData\Local\Microsoft\Windows\UsrClass.dat file:
Os {
code: 32,
kind: Uncategorized,
message: "The process cannot access the file because it is being used by another process.",
},Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels