diff --git a/src/main/java/dev/dokan/dokan_java/AbstractDokanFileSystem.java b/src/main/java/dev/dokan/dokan_java/AbstractDokanFileSystem.java index 3471433..318f843 100644 --- a/src/main/java/dev/dokan/dokan_java/AbstractDokanFileSystem.java +++ b/src/main/java/dev/dokan/dokan_java/AbstractDokanFileSystem.java @@ -173,7 +173,7 @@ private boolean isImplemented(String funcName) { * @param sectorSize the sector size * @param UNCName * @param threadCount the number of threads spawned for processing filesystem calls - * @param options an {@link EnumIntegerSet} containing {@link MountOption}s + * @param options an {@link MaskValueSet} containing {@link MountOption}s */ @Override public final synchronized void mount(Path mountPoint, String volumeName, int volumeSerialnumber, boolean blocking, long timeout, long allocationUnitSize, long sectorSize, String UNCName, short threadCount, MaskValueSet options) { diff --git a/src/main/java/dev/dokan/dokan_java/examples/DirListingFileSystem.java b/src/main/java/dev/dokan/dokan_java/examples/DirListingFileSystem.java index 4f6025b..1c9ea81 100644 --- a/src/main/java/dev/dokan/dokan_java/examples/DirListingFileSystem.java +++ b/src/main/java/dev/dokan/dokan_java/examples/DirListingFileSystem.java @@ -10,22 +10,20 @@ import dev.dokan.dokan_java.DokanOperations; import dev.dokan.dokan_java.DokanUtils; import dev.dokan.dokan_java.FileSystemInformation; -import dev.dokan.dokan_java.constants.EnumInteger; import dev.dokan.dokan_java.constants.microsoft.CreateDisposition; import dev.dokan.dokan_java.constants.microsoft.CreateOption; -import dev.dokan.dokan_java.constants.microsoft.FileAttribute; import dev.dokan.dokan_java.constants.microsoft.NtStatuses; import dev.dokan.dokan_java.constants.microsoft.Win32ErrorCodes; +import dev.dokan.dokan_java.conv.EnumInteger; +import dev.dokan.dokan_java.conv.MaskValueSet; import dev.dokan.dokan_java.structure.ByHandleFileInformation; import dev.dokan.dokan_java.structure.DokanFileInfo; import dev.dokan.dokan_java.structure.DokanIOSecurityContext; -import dev.dokan.dokan_java.conv.MaskValueSet; import java.io.IOException; import java.nio.file.FileStore; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.attribute.DosFileAttributeView; import java.nio.file.attribute.DosFileAttributes; import java.util.concurrent.atomic.AtomicLong; import java.util.stream.Stream; @@ -89,7 +87,7 @@ public int zwCreateFile(WString rawPath, DokanIOSecurityContext securityContext, } if (Files.isDirectory(p)) { - if ( EnumIntegerSet.enumSetFromInt(rawCreateOptions, CreateOption.values()).contains(CreateOption.FILE_NON_DIRECTORY_FILE)) { + if ( MaskValueSet.getSetFromInt(rawCreateOptions, CreateOption.values()).contains(CreateOption.FILE_NON_DIRECTORY_FILE)) { return NtStatuses.STATUS_FILE_IS_A_DIRECTORY; } else { dokanFileInfo.IsDirectory = 1; @@ -102,6 +100,8 @@ public int zwCreateFile(WString rawPath, DokanIOSecurityContext securityContext, } dokanFileInfo.Context = val; + + return Win32ErrorCodes.ERROR_SUCCESS; } @Override