dokan-java icon indicating copy to clipboard operation
dokan-java copied to clipboard

Adding wrappers for high-level programming

Open JaniruTEC opened this issue 4 years ago • 2 comments

Hello, just my first time diving into Dokany and dokan-java. Looking at the API I noticed that many classes like DokanyFileSystemStub are closer to "C-Code" than to default Java OOP-Approached classes. They only return ints and handle returns via callbacks or use WString as parameters.

Are there plans to include a more OOP/Java-like API? Is this something I could contribute?

JaniruTEC avatar Mar 24 '20 18:03 JaniruTEC

Well, since this library is first and foremost a wrapper for dokany, it is no wonder that it resembles c code.

Of course a more Java-like approach is desirable, but difficult to realize. In the end the developer needs to implement the dokany api, which expects status codes as return values and gives you pointers and bit masks as parameters.

But i'm open for suggestions (:

infeo avatar Apr 23 '20 19:04 infeo

I've been working on a java-like-approach for some time now. If you were to add a second layer, the library could handle translation from bitmasks into EnumIntegerSets and could translate pointers to/from wrapper classes (e.g. I created a class "DiskSpaceInfo" to wrap the space parameters for getDiskFreeSpace)

Also my approach to status codes would have been to throw exceptions which are handled and translated by the second layer.

Is there a way to contact you outside of GitHub, as I have trouble getting my test environment for the current snapshot version set up and got a couple more questions.

JaniruTEC avatar Apr 25 '20 16:04 JaniruTEC