Skip to content

Simplified dokan-java #50

@hrstoyanov

Description

@hrstoyanov

@infeo Some while back I forked dokan-java here and wanted to simplify the code base for my needs. You can see that my fork has much less classes/interfaces, yet i find it still just as useful - "less is more" . I wonder if you would like such simplifications contributed back. Here are a few details:

1. DokanFileSystem/DokanFileSystemStub/AbstractDokanFileSystem removed
The problem with DokanFileSystem@friends is that is a very large and brittle interface. It essentially flattens out the many small interfaces in _DokanOperations, where you already had the correct design . Further, the way you coded this requires annotation processing (see NotImplemented), which is not good - what if a developer inherits a class from AbstractDokanFileSystem and forgets to annotate methods?

I do see however, how DokanFileSystem can separate components in the cryptomator project, and maybe they belong there. I just do not see any need for them in dokan-java, removed them in my fork and did not miss them at all!

2. I salvaged the code from AbstractDokanFileSystem
into a new class DokanyMountPoint

3. New meaning of DokanyFileSystem,
I renamed FileSystemInformation -->DokanyFileSystem

**4. Consolidated a bunch of static methods into DokanyUtils

5. Consolidated all exception into one - DokanyException

6. Added default static methods in DokanyOperations
This way the a user can provide implementations only for what they have to.

I might be forgetting some other changes I made, but overall the number of classes and API surface shrunk considerably, making dokan-java codebase easier to use/understand.

Let me know what you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions