bbfsdev/bbfs — pull request #242 by yarondbb (2014-01-08 17:56:58+00:00)
Title: Issue 237 monitor dir rename

Summary of solution for this branch:
User flow:
1. Stop the application
2. Run Do manual changes in monitoring directories (any change)
3. Run the application with new flag: manual_file_change=true
4. Application should provide new content data file with the manual changes (without doing any indexing), and exit
5. Run application again with new flag: manual_file_change=false (default calue). Application will load the uchanged content data file and continue

Alogorithm for step 3:
load content data with new flag: 'manual_file_change'
During load the application will builld new map:
file,size,mod --> [checksum, uniqu]
If key found more then 1 time,then uniqu become false. This will indicate not to do anything with it during manual change

monitoring new behavior:
existing files in Application Tree - ignore
new found files in OS system:
If not exist in map - need to be indexed. skip (will be handled in step 5.
If exist in map (copied or moved):
if uniqu is true - take the original checksum and add to ContentData
if uniqu is false - need to be indexed. skip. will be handled in step 5.
unmarked files (non existing) - will have legacy behavior and be remove from content data
Write new content data to file
Exit the application