Skip to content

Commit

Permalink
Renamed DokanyFileHandle to DokanFileHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
JaniruTEC committed May 23, 2020
1 parent 45fe7a3 commit 01e50b1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import java.util.concurrent.atomic.AtomicInteger;

public class DokanyFileHandle { //TODO Add Getters?!
public class DokanFileHandle { //TODO Add Getters?!

private static final long INVALID_HANDLE = 0L;

Expand All @@ -17,7 +17,7 @@ public class DokanyFileHandle { //TODO Add Getters?!
private int processId;
private DokanOptions dokanOpts; //TODO

public DokanyFileHandle(DokanFileInfo nativeInfo) {
public DokanFileHandle(DokanFileInfo nativeInfo) {
this.context = nativeInfo.Context;
this.dokanContext = nativeInfo.DokanContext;
this.processId = nativeInfo.ProcessId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public interface EasyDokanyFileSystem {
// int rawShareAccess,
// int rawCreateDisposition,
// int rawCreateOptions,
// DokanFileInfo dokanFileInfo) { //TODO Return type //TODO Incorporate path into DokanyFileHandle
// DokanFileInfo dokanFileInfo) { //TODO Return type //TODO Incorporate path into DokanFileHandle
@NativeName("zwCreateFile")
void createHandle(Path absolutePath,
String relativePath,
Expand All @@ -31,111 +31,111 @@ void createHandle(Path absolutePath,
EnumIntegerSet<FileShareAccess> shareAccess,
CreationDisposition creationDisposition,
EnumIntegerSet<CreateOption> createOptions,
DokanyFileHandle dokanyFileHandle
DokanFileHandle dokanFileHandle
); //--> zwCreateFile

@NativeName("cleanup")
void cleanup(Path absolutePath, String relativePath, DokanyFileHandle dokanyFileHandle);
void cleanup(Path absolutePath, String relativePath, DokanFileHandle dokanFileHandle);

@NativeName("closeFile")
void closeHandle(Path absolutePath, String relativePath, DokanyFileHandle dokanyFileHandle); //--> CloseFile
void closeHandle(Path absolutePath, String relativePath, DokanFileHandle dokanFileHandle); //--> CloseFile

@NativeName("readFile")
byte[] readFile(Path absolutePath,
String relativePath,
long offset,
int readLength,
DokanyFileHandle dokanyFileHandle); //TODO return -> callback-array?
DokanFileHandle dokanFileHandle); //TODO return -> callback-array?

@NativeName("writeFile")
int writeFile(Path absolutePath, String relativePath, byte[] buffer, long offset, DokanyFileHandle dokanyFileHandle);
int writeFile(Path absolutePath, String relativePath, byte[] buffer, long offset, DokanFileHandle dokanFileHandle);

@NativeName("flushFileBuffers")
void flush(Path absolutePath, String relativePath, DokanyFileHandle dokanyFileHandle);
void flush(Path absolutePath, String relativePath, DokanFileHandle dokanFileHandle);

@NativeName("getFileInformation")
EasyFileInfo getFileInformation(Path absolutePath, String relativePath, DokanyFileHandle dokanyFileHandle);
EasyFileInfo getFileInformation(Path absolutePath, String relativePath, DokanFileHandle dokanFileHandle);

@NativeName("findFiles")
Collection<FindFileInfo> findFiles(Path absolutePath, String relativePath, DokanyFileHandle dokanyFileHandle);
Collection<FindFileInfo> findFiles(Path absolutePath, String relativePath, DokanFileHandle dokanFileHandle);
//TODO --> Collection to callback?! --> default method?

@NativeName("findFilesWithPattern")
Collection<FindFileInfo> findFilesWithPattern(Path absolutePath,
String relativePath,
String pattern, //TODO Regex
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);
//TODO --> Collection to callback?!

@NativeName("setFileAttributes")
void setFileAttributes(Path absolutePath,
String relativePath,
EnumIntegerSet<FileAttribute> fileAttributes,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("setFileTime")
void setFileTime(Path absolutePath,
String relativePath,
FileTime creationTime,
FileTime lastAccessTime,
FileTime lastWriteTime,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("deleteFile")
void prepareDeleteFile(Path absolutePath,
String relativePath,
DokanyFileHandle dokanyFileHandle); //TODO Rename, return value?
DokanFileHandle dokanFileHandle); //TODO Rename, return value?

@NativeName("deleteDirectory")
void prepareDeleteDirectory(Path absolutePath,
String relativePath,
DokanyFileHandle dokanyFileHandle); //TODO Rename, return value?
DokanFileHandle dokanFileHandle); //TODO Rename, return value?

@NativeName("moveFile")
void moveFile(Path sourceAbsolutePath,
String sourceRelativePath,
Path destinationAbsolutePath,
String destinationRelativePath,
boolean replaceIfExisting,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("setEndOfFile")
void setEndOfFile(Path absolutePath,
String relativePath,
long fileSize,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("setAllocationSize")
void setAllocationSize(Path absolutePath,
String relativePath,
long allocationSize,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("lockFile")
void lockFile(Path absolutePath,
String relativePath,
long lockOffset,
long lockLength,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("unlockFile")
void unlockFile(Path absolutePath,
String relativePath,
long lockOffset,
long lockLength,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

@NativeName("getDiskFreeSpace")
DiskSpaceInfo getDiskSpaceInfo(DokanyFileHandle dokanyFileHandle); //TODO Path?
DiskSpaceInfo getDiskSpaceInfo(DokanFileHandle dokanFileHandle); //TODO Path?

@NativeName("getVolumeInformation")
VolumeInformation getVolumeInformation(DokanyFileHandle dokanyFileHandle); //TODO Path?
VolumeInformation getVolumeInformation(DokanFileHandle dokanFileHandle); //TODO Path?

@NativeName("mounted")
void mounted(DokanyFileHandle dokanyFileHandle); //TODO Path?
void mounted(DokanFileHandle dokanFileHandle); //TODO Path?

@NativeName("unmounted")
void unmounted(DokanyFileHandle dokanyFileHandle); //TODO Path?
void unmounted(DokanFileHandle dokanFileHandle); //TODO Path?

// int getFileSecurity(WString rawPath,
// int /* SecurityInformation */ rawSecurityInformation, //Requested information //DesiredAccessMask OR Similar CLASS OR EnumIntegerSet
Expand All @@ -148,7 +148,7 @@ SelfRelativeSecurityDescriptor getFileSecurity(Path absolutePath, //TODO Return
String relativePath,
DesiredAccessMask requestedDescriptorInfo,
int availableLength,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

// int setFileSecurity(
// WString rawPath,
Expand All @@ -162,7 +162,7 @@ void setFileSecurity(Path absolutePath,
DesiredAccessMask suppliedDescriptorInfo,
SelfRelativeSecurityDescriptor securityDescriptor,
int availableLength,
DokanyFileHandle dokanyFileHandle);
DokanFileHandle dokanFileHandle);

//TODO fillWin32FindData, findStreams

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Supplementary class to bundle information of the mounted volume and its filesystem.
* <p>Mainly used for {@link DokanOperations#GetVolumeInformation} function to have all needed information at one place.</p>
* TODO: Maybe this can be completely integrated in the DokanyFileSystem class
* TODO: Maybe this can be completely integrated in the DokanFileSystem class
*/
public final class VolumeInformation {
private final int maxComponentLength;
Expand Down

0 comments on commit 01e50b1

Please sign in to comment.