@zqlustc Per microsoft documentation, cleanup cannot fail. If delete must fail, it must be during createfile or set delete that everything need to put in place for the delete to work during cleanup.
I want to control the right of deleting a file, I know that cleanup can't be stopped and try to use another fuction: DeleteFile in dokan_operations.
the interface comment says:
DeleteFile will also be called with DOKAN_FILE_INFO.DeleteOnClose set to \c FALSE to notify the driver when the file is no longer requested to be deleted.
And DeleteFile can return STATUS_ACCESS_DENIED to stop delete.
But I find DeleteFile is not called when I delete a file in a file system created by the memfs.exe, so how can I control the right of delete.
Originally posted by @Liryna in https://github.com/dokan-dev/dokany/issues/970#issuecomment-774614866
I want to control the right of deleting a file, I know that cleanup can't be stopped and try to use another fuction: DeleteFile in dokan_operations.
the interface comment says: DeleteFile will also be called with DOKAN_FILE_INFO.DeleteOnClose set to \c FALSE to notify the driver when the file is no longer requested to be deleted. And DeleteFile can return STATUS_ACCESS_DENIED to stop delete.
But I find DeleteFile is not called when I delete a file in a file system created by the memfs.exe, so how can I control the right of delete.