Interface DokanyOperations.DeleteFile

All Superinterfaces:
com.sun.jna.AltCallingConvention, com.sun.jna.Callback, DokanCallback, com.sun.jna.win32.StdCall, com.sun.jna.win32.StdCallLibrary.StdCallCallback
Enclosing class:
DokanyOperations
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface DokanyOperations.DeleteFile extends DokanCallback
Check if it is possible to delete a file.

You should NOT delete the file in this method, but instead you must only check whether you can delete the file or not, and return NtStatus.SUCCESS (when you can delete it) or appropriate error codes such as NtStatus.ACCESS_DENIED, NtStatus.OBJECT_NO_LONGER_EXISTS, NtStatus.OBJECT_NAME_NOT_FOUND.

DokanyOperations.DeleteFile will also be called with DokanyFileInfo.DeleteOnClose set to false to notify the driver when the file is no longer requested to be deleted.

When you return NtStatus.SUCCESS, you get a DokanyOperations.Cleanup> call afterwards with DokanyFileInfo.DeleteOnClose set to true and only then you have to actually delete the file being closed.

  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.sun.jna.Callback

    com.sun.jna.Callback.UncaughtExceptionHandler
  • Field Summary

    Fields inherited from interface com.sun.jna.Callback

    FORBIDDEN_NAMES, METHOD_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    callback(com.sun.jna.WString rawPath, DokanyFileInfo dokanyFileInfo)
     
  • Method Details

    • callback

      long callback(com.sun.jna.WString rawPath, DokanyFileInfo dokanyFileInfo)
      Parameters:
      rawPath -
      dokanyFileInfo - DokanyFileInfo with information about the file.
      Returns:
      NtStatus