dokan-dev / dokan-rust Goto Github PK
View Code? Open in Web Editor NEWDokan Rust Wrapper
License: MIT License
Dokan Rust Wrapper
License: MIT License
We're on widestring v0.4.3
but the latest is v1.0.2
. The most important thing we're missing is a macro u16str!
It's my understanding that in C the function pointer to find_files_with_pattern
may be left unset. However the rust wrapper implements its default implementation here.
Problem is this: The C code uses find_files
here to get the content of the directory. Then it gets here, then here, then here and finally ends up in MatchFiles
.
In MatchFiles
it checks whether FindFilesWithPattern
is set, which it is and thus patternCheck
is NOT set to TRUE
.
Because of that this condition always passes on the first entry that find_files
returns.
This bug can be reproduced with your memfs example:
@Liryna Is it possible to host documentation pages of this project on dokan-dev.github.io, like what has been done for dokany and dokan-dotnet?
Normally documentation of Rust packages are expected to be hosted on docs.rs. However, their build environment doesn't provide Windows SDK, which is required to build this project. So self-hosting seems to be the only option.
I tried to embed Dokany into my application, but after importing "dokan-rust", the program will forcefully request "dokan1.dll", and the main() entry is not executed, so the dll cannot be released in the main() function, is there any How to customize the dependencies of "dokan1.dll"?
When a println!
line is inserted into a function inside an implementation of the FileSystemHandler
and a test is run, the println!
line is not captured by the test but is printed out right when the test is run.
For example, if we add println!("<<< hello from handler >>>")
above this line, and then run the (currently failing) test cargo test can_find_files
. The output is
running 1 test
<<< hello from handler >>>
test usage_tests::can_find_files ... FAILED
failures:
---- usage_tests::can_find_files stdout ----
thread 'usage_tests::can_find_files' panicked at dokan\src\usage_tests.rs:1144:9:
assertion `left == right` failed
left: 16
right: 128
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
usage_tests::can_find_files
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 32 filtered out; finished in 0.02s
error: test failed, to rerun pass `-p dokan --lib`
Notice that the "<<< hello from handler >>>"
line appears above the "---- usage_tests::can_find_files stdout ----"
line.
This would normally not be too big of a problem, but it becomes one when tests run ok individually and only start misbehaving when they are run all at once.
My theory is that the FileSystemHandler
functions are being called from insider the driver and this somehow circumvents the stdout
output that the test is capturing. But I know next to nothing about Windows driver development, so I might very well be wrong.
Perhaps there is a flag that I missed that could fix this? Or maybe someone could suggest a fix?
I’m relatively new to Rust FFI bindings and have been learning about how Windows handles various operations. My background is primarily in Rust, c and c++ programming for Linux-based OS, so diving into Windows is a fresh and exciting challenge for me.
I’ve been assigned a task to create a virtual drive system on Windows. So far, I’ve managed to list directories by replicating a folder from my local storage using the find_files
and create_file
methods.
My current understanding is that to open a file, I need to implement the read_file
method, assign the file to the buffer as &[u8], and return the size as u32. However, I’ve been struggling with this for the past three days. The issue I’m facing is that the read_file
method is not being called when I try to open a file.
When I attempt to open a file, I encounter an error dialogue box stating The Directory name is invalid
.
I would greatly appreciate any guidance or suggestions on how to resolve this issue. Thanks in advance for your help!
@Liryna I've sent an request to allow my AppVeyor account to access this repo. I should be able to set up CI testing once you approve the request.
BTW, documentation is complete and now I'm migrating my "yasfw" project to use this library. This way, I can make sure that this library won't cause any surprises when used in real world applications. (Acutally I've found and fixed several such problems that the unit tests failed to catch when writing the documentation, so I'm not 100% sure now) I should be able to release it to crates.io after getting this done.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.