EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnIsDirectoryEmpty question

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
#28385
Posted: 02/12/2014 07:44:54
by William Levra-Juillet (Priority Standard support level)
Joined: 09/05/2013
Posts: 49

Hi,

Running OnIsDirectoryEmpty is very slow due to how it is implemented in our system (we have no choice but open the directory, browse it, then close it, so that's 3 network requests).
As far as I can tell, there is no pending IRP associated to OnIsDirectoryEmpty, and it's only requested by CBFS implementation. Is it correct?
In my callback, the callstack is always from CbFsUcbGetFileAttributes.

My question is: Can we safely "shortcut" OnIsDirectoryEmpty and always return "true"? (and then fail the CanFileBeDeleted() if not empty?)
It will help us keep the performance similar to Dokan (where OnIsDirectoryEmpty does not exist).
Any thoughts?
Thx!
#28387
Posted: 02/13/2014 01:42:15
by Volodymyr Zinin (EldoS Corp.)

Yes, you can do it in the following way. Perhaps the OnIsDirectoryEmpty callback will be removed in future as "excessive".
#28388
Posted: 02/13/2014 02:36:04
by William Levra-Juillet (Priority Standard support level)
Joined: 09/05/2013
Posts: 49

Good to know, thx!

Reply

Statistics

Topic viewed 695 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!