forked from dokan-dev/dokan-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added multiple Enums to wrap native bitmasks
Added DokanFileInfoFlag to aid in creating a wrapper ("DokanFileHandle") for DokanFileInfo's getters (e.g. isDirectory()) Added FileShareAccess to wrap paramter rawShareAccess of DokanyFileSystem#zwCreateFile to aid in creating a wrapper ("EasyDokanFileSystem") for DokanyFileSystem Added MicrosoftReparsePointTag to wrap field dwReserved0 of WinBase.WIN32_FIND_DATA to aid in creating a wrappe ("FindFileInfo") for WinBase.WIN32_FIND_DATA (used by DokanyFileSystem#findFiles) This commit is part of my effort to fix dokan-java's issue 32 (dokan-dev#32): Adding wrappers for high-level programming
- Loading branch information
Showing
4 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/main/java/dev/dokan/dokan_java/constants/dokany/DokanFileInfoFlag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package dev.dokan.dokan_java.constants.dokany; | ||
|
||
import dev.dokan.dokan_java.constants.EnumInteger; | ||
|
||
/** | ||
* [TO BE REPLACED WITH LICENSE NOTE] | ||
*/ | ||
public enum DokanFileInfoFlag implements EnumInteger { | ||
|
||
DELETE_ON_CLOSE(1), | ||
IS_DIRECTORY(2), | ||
NO_CACHE(4), | ||
PAGING_IO(8), | ||
SYNCHRONOUS_IO(16), | ||
WRITE_TO_END_OF_FILE(32); | ||
|
||
private final int mask; | ||
|
||
DokanFileInfoFlag(int mask) { | ||
this.mask = mask; | ||
} | ||
|
||
@Override | ||
public int getMask() { | ||
return this.mask; | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/main/java/dev/dokan/dokan_java/constants/microsoft/FileShareAccess.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dev.dokan.dokan_java.constants.microsoft; | ||
|
||
import dev.dokan.dokan_java.constants.EnumInteger; | ||
|
||
public enum FileShareAccess implements EnumInteger { | ||
|
||
FILE_SHARE_READ(1), | ||
FILE_SHARE_WRITE(2), | ||
FILE_SHARE_DELETE(4); | ||
|
||
private final int mask; | ||
|
||
FileShareAccess(int mask) { | ||
this.mask = mask; | ||
} | ||
|
||
@Override | ||
public int getMask() { | ||
return this.mask; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
src/main/java/dev/dokan/dokan_java/constants/microsoft/MicrosoftReparsePointTag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package dev.dokan.dokan_java.constants.microsoft; | ||
|
||
import dev.dokan.dokan_java.constants.EnumInteger; | ||
|
||
/** | ||
* [TO BE REPLACED WITH LICENSE NOTE] | ||
*/ | ||
public enum MicrosoftReparsePointTag implements EnumInteger { | ||
|
||
IO_REPARSE_TAG_CSV(0x80000009), | ||
IO_REPARSE_TAG_DEDUP(0x80000013), | ||
IO_REPARSE_TAG_DFS(0x8000000A), | ||
IO_REPARSE_TAG_DFSR(0x80000012), | ||
IO_REPARSE_TAG_HSM(0xC0000004), | ||
IO_REPARSE_TAG_HSM2(0x80000006), | ||
IO_REPARSE_TAG_MOUNT_POINT(0xA0000003), | ||
IO_REPARSE_TAG_NFS(0x80000014), | ||
IO_REPARSE_TAG_SIS(0x80000007), | ||
IO_REPARSE_TAG_SYMLINK(0xA000000C), | ||
IO_REPARSE_TAG_WIM(0x80000008); | ||
|
||
private final int mask; | ||
|
||
MicrosoftReparsePointTag(int mask) { | ||
this.mask = mask; | ||
} | ||
|
||
@Override | ||
public int getMask() { | ||
return this.mask; | ||
} | ||
} |