Dokan library 0.4.0 released
Dokan library 0.4.0 has just been released!
I’m pleased to announce the launch of new version of Dokan library. I completely redesigned the driver event handling model. There are a lot of improvements from the previous version. You must recompile all programs which use Dokan library because dokan.h is changed and this version is not compatible with the previous one. You need to update Dokan.NET, Dokan Ruby and Dokan SSHFS.
The license of Dokan driver is changed to LGPL from GPL.
- driver (dokan.sys) : LGPL
- dll (dokan.dll) : LGPL
- mounter, dokanctl, mirror sample : MIT
Dokan API is changed.
The difference of dokan.h is here
I changed to pass DOKAN_OPTIONS (which is passed to DokanMain) in DOKAN_FILE_INFO structure
and I put GlobalContext in DOKAN_OPTIONS structure. I add “DeleteOnClose” in DOKAN_FILE_INFO structure and changed the usage of Cleanup, DeleteFile and DeleteDirectory.
You should not delete file on DeleteFile or DeleteDirectory. When DeleteFile or DeleteDirectory, you must check whether you can delete or not, and return 0 (when you can delete it) or appropriate error codes such as -ERROR_DIR_NOT_EMPTY, -ERROR_SHARING_VIOLATION. When you return 0 (ERROR_SUCCESS), you get Cleanup with FileInfo->DeleteOnClose set TRUE, then you delete the file.
Changes from 0.3.9.
- Fixed: error during multiple file deletion. issue
- Fixed: excel support issue
- Fixed: file deletion in Explorer issue
- Fixed: improper CloseHandle issue
- Supported: filesytem wide context issue
- Fixed: 0 byte read issue
- Fixed: saving new file in notepad issue
x64 version coming soon.
Thanks to all for fixing this great library. I can now create, read, and write to files with only 22 lines of code added to DokaNetMirror. I never thought writing a VFS could be so simple.
I think I’ve found as error in the way “FileAccess access” in the CreateFile function in the dokan-net library. GENERIC_READ should be 0×8 not 0×80000000 and GENERIC_WRITE should be 0×4 not 0×40000000. Don’t ya just hate that little/big endian mess.
Great work
Suggestion: how about starting a Google Group or some other mailing list for your community of fellow developers and users?
Hi!
Good Work! I tried the new Dokan Version works fine! But I think in Dokan.net Deleteonclose is missing in Fileinfo.
Peter
Hello,
I test the delivered sample and I cannot create a directory name if it is longer than 8 characters and it is truncated to 8 characters for a filename…Is it possible to remove this check? If yes, how?
Thanks for your help…
Hi!
I have 2 Issues with the new Dokan Version.
I still can’t edit Microsoft Excel docx files on Dokan mirrorfs.
and when my app chrashes the filesystem isn’t unmounted. Is there a way to tell dokan to unmount by itself it a requests to the app timoeout?
@MC
I don’t think thats Dokan doesn’t support long dirnames, because when using Dokan.net I can create really long dir names. Perhaps there is a bug in the sample.
Peter
I’ll give it another try (there was the memory leaking).
Thanks for nice Christmas present
Re “You should not delete file on DeleteFile or DeleteDirectory. When DeleteFile or DeleteDirectory, you must check whether you can delete or not, and return 0 (when you can delete it) or appropriate error codes such as -ERROR_DIR_NOT_EMPTY, -ERROR_SHARING_VIOLATION. When you return 0 (ERROR_SUCCESS), you get Cleanup with FileInfo->DeleteOnClose set TRUE, then you delete the file.”
This means the check + delete non-atomic, so another user thread could come in and do something to the file or dir in the middle that will then cause an error on the delete. How can we best solve this?
Hi, JimR
> This means the check + delete non-atomic, so another user thread
> could come in and do something to the file or dir in the middle
> that will then cause an error on the delete.
Yes, though I think that is a rare case.
> How can we best solve this?
Filesystem should handle that. I think it is not easy to do, you need to store information per file, and every filesystem should handle that situation. In the next version, I’ll set DeleteOnClose in the next version when the same file is accessed, so that you can check whether that is deleted or not.
[...] Changes since 0.4.0 - Fixed error while creating new file with Word 2003. issue - Fixed dokan.dll crash when it is restarted after unexpected termination. - Set DeleteOnClose flag in CreateFile when the file is already marked as deleted. JimR reported [...]
How to implement read write functionality using Dokan Library. Any Help