Support displaying general file information on Windows #35
Labels
effort: medium
Something that can be done quickly with some effort
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
Is your feature request related to a problem? Please describe.
binsider
now support Windows (when building via--no-default-features
) after #31, however the general file information is not available due to the Rust API differences between Linux.See the failed workflow for more information: https://github.com/orhun/binsider/actions/runs/10902683795/job/30255132721?pr=31
We need to solve these build errors via refactoring
file.rs
in a more generic way.Unfortunately I don't have a development environment for Windows and running the following command again and again on Linux is not very convenient for developing/testing this:
Describe the solution you'd like
One idea is to create a trait called
PlatformFileInfo
(I'm bad at naming) and implement it forFileInfo
for having generalized functions for both Linux and Windows. Eventually updateui.rs
and other related files to render the file information correctly.To do this, one should also remove the
if cfg!(target_os = "windows")
checks. See 83657f9 for more information.Describe alternatives you've considered
None. I'm open to ideas though!
Additional context
See:
https://doc.rust-lang.org/stable/std/os/linux/fs/trait.MetadataExt.html
vs
https://doc.rust-lang.org/stable/std/os/windows/fs/trait.MetadataExt.html
The text was updated successfully, but these errors were encountered: