EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CbFsEnumerateDirectory does 2 things and it would be nice to separate those 2.

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 10/28/2014 10:59:55
by VoxPopuli Robot  (EldoS Corp.)

When implementing the CBFS callbacks/events, I kind of struggled with the CbFsEnumerateDirectory event. After a while I realized that this event does actually 2 things. It scans through the directory, using a mask like '*', and it searches for a specific file using any other mask. Within my own code I was even able to completely separate those functions by switching on the mask. Having 2 meanings violates the single responsibility principle. It would be nice to have 2 events instead. One that only scans the directory, and one that searches for a specific file or folder. This would reduce a lot of plumbing and fiddling around with the EnumerationInfo.UserContext, and these events would be much easier to understand when you use this product for the first time.

If you like the idea, vote for it on https://www.eldos.com/cbfs/wishlist.php
Posted: 10/28/2014 11:05:49
by Eugene Mayevski (EldoS Corp.)

All events correspond to filesystem requests. The requests are sent by the filesystem (and usually initiated by the application). The application can search for files using masks like "*", "*.*" or "abc***.def" and that all will be *enumeration* of files. You must NOT distinguish these operations. Indeed sometimes the OS *can* send the request with no wildcard characters in mask, but that is not usual.

Sincerely yours
Eugene Mayevski



Topic viewed 1077 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!