Comments (5)
Checking Windows's own more
utility, it returns the same error: The system cannot find the path specified.
This Stack Exchange thread gives more detail on why, but suffice it to say that unlike in Unix-like operating systems, Windows does not just let you access volumes/drives just like you can a file. I did some digging into the Windows file access methods and found that CreateFileW
should allow you to access a drive as a file. The winsafe
library provides a safe wrapper for this method through its own File::open
method. Note that this File
uses its own read
which wraps ReadFile
and does not implement std::io::Read
, so in order for this to be implemented into hexyl
one would have to create a wrapper struct for it and implement Read
on it, in addition to writing logic that would recognize the file path as a drive and handle it as a special case.
EDIT: After some more research, I found the FileMapped
struct which will open the drive as a [u8]
, which does implement Read
. The only implementation details left would be handling the path and adding it as an additional variant of Input
.
My access to Windows is limited and I would not be able to test this implementation, so I would not be able to contribute to it. However, @whitequill, if you're interested in getting this to work, I've provided all the necessary details here to implement this yourself.
from hexyl.
I was trying to open a device in hexyl with
hexyl.exe \\?\Volume{0893efeb-32d9-46d8-bc15-34d18c0e669a}\
does it not have this functionality yet?
I'm not a Windows expert, so I don't really know what you expect this to do. Can other tools open this exact path?
from hexyl.
I want to open a device like I would open hexyl /dev/hde1
on Linux.
from hexyl.
Can other tools open this exact path?
from hexyl.
I will give this some thought. As I need to look at the current hexyl code base and the Microsoft documentation.
from hexyl.
Related Issues (20)
- Is there a cheat sheet anywhere telling what color correlates to category of byte? HOT 3
- Add support for the NO_COLOR environment variable HOT 4
- Regression: broken pipe error
- Make --panels=auto the new default? HOT 3
- hexyl should not fail if `--panels=auto` is used and output is not a TTY
- Identical lines not squeezed HOT 3
- hexyl -C does the inverse of hexdump -C HOT 1
- Request: publish source tar with generated manpage HOT 3
- Support for different code pages / character tables
- Incorrect output when reading from terminal HOT 2
- Feature request: Ship as a crate HOT 3
- `hexyl /dev/zero` hangs HOT 6
- Display some non-printable characters like `bat --show-all` HOT 5
- Feature request: Comodore prg mode HOT 1
- CI artifact names conflict HOT 2
- Provide Statically Compiled Binaries for (aarch64|arm64) Linux HOT 1
- Support raw output HOT 2
- Customize colors
- Completions for fish shell HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexyl.