Open juliusl opened 8 months ago
The docs currently say:
This will return None if the Metadata instance was not created using the FILE_BASIC_INFO type.
Could you reword this to clarify what is required for somebody using Rust's APIs? It isn't clear how somebody may or may not wind up with a FILE_BASIC_INFO
, since that type isn't mentioned anywhere.
@tgross35 FILE_BASIC_INFO is a windows api struct and actually seeing the alternative implementation I think we could align both implementations so that I can return a value in both cases, see -- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getfileinformationbyhandleex#remarks
I'll tinker and see if I can draft something
@tgross35 FILE_BASIC_INFO is a windows api struct
As in, to non-uwp users this only comes up if they are using the windows
crate? If that is accurate then it would just be good to mention, I just couldn't figure out how this gets used. But...
and actually seeing the alternative implementation I think we could align both implementations so that I can return a value in both cases, see -- https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getfileinformationbyhandleex#remarks
I'll tinker and see if I can draft something
that sounds even better, cool.
In Windows, there's a field in FILE_BASIC_INFO called ChangeTime that tracks when file metadata is changed, such as renaming, file attributes, etc.
Currently, this property isn't included in the ::sys::windows::fs::FileAttr implementation, but is available in the c::FILE_BASIC_INFO impl.
Last write time (which is currently provided) is the last time the data stream changed, and this value represents a different time value.
source
This change adds a method
change_time()
to theMetadataExt
trait in order to provide this value.Public API
Steps / History
Unresolved Questions