Ferret File System/v0.1/process: Difference between revisions
< Ferret File System | v0.1
Jump to navigation
Jump to search
(scanning a volume, take 1) |
(imperative tense; more instructions) |
||
Line 1: | Line 1: | ||
==Scanning a Volume== | ==Scanning a Volume== | ||
When given a volume to scan, here's what happens: | When given a {{l/fileferret/sql|volume}} to scan, here's what happens: | ||
* | * For every {{l/fileferret/sql|entry}} record in that volume: | ||
* For each item found, | ** Clear the "didFind" flag. (These get set as entries are found during the scan.) | ||
** Set the "didSeek" flag. (Indicates entries that existed before this scan.) | |||
* Read the directory at the volume's URL. | |||
* For each item found, do "Each Entry" below. (This maps the volume.) | |||
===Each Entry=== | ===Each Entry=== | ||
* | * Look for a matching {{l/fileferret/sql|entry}}. | ||
* If entry does not exist, | * If entry does not exist, create it. | ||
* | * Log that the entry was found, and whether it was new or existing. | ||
* If it was an existing entry, | * If it was an existing entry, log any changes in the specs (timestamps, size). | ||
* If Entry is a File, | * If Entry is a File, do "Each File" below. | ||
* If Entry is a Folder, | * If Entry is a Folder, do "Each Folder" below. | ||
===Each File=== | ===Each File=== | ||
* | * Check the {{l/fileferret/sql|firev}} to see if it matches. | ||
** If not, | ** If not, create a new firev and updates the file's ID_Firev. | ||
** | ** Log whether the firev has changed or not. | ||
===Each Folder=== | ===Each Folder=== | ||
* | * If folder is new: | ||
** If it | ** Check name against text blacklist. | ||
** | ** If found: | ||
*** Mark it "noScan" when creating. | |||
*** Add a note which includes the matching blacklist line. | |||
* If "noScan" is set: | |||
** log that it was not scanned ("noScan" is currently the only possible reason for this). | |||
* ...else... | |||
** do "Each Entry" above for each entry in the folder's directory. |
Revision as of 23:23, 27 February 2016
Scanning a Volume
When given a volume to scan, here's what happens:
- For every entry record in that volume:
- Clear the "didFind" flag. (These get set as entries are found during the scan.)
- Set the "didSeek" flag. (Indicates entries that existed before this scan.)
- Read the directory at the volume's URL.
- For each item found, do "Each Entry" below. (This maps the volume.)
Each Entry
- Look for a matching entry.
- If entry does not exist, create it.
- Log that the entry was found, and whether it was new or existing.
- If it was an existing entry, log any changes in the specs (timestamps, size).
- If Entry is a File, do "Each File" below.
- If Entry is a Folder, do "Each Folder" below.
Each File
- Check the firev to see if it matches.
- If not, create a new firev and updates the file's ID_Firev.
- Log whether the firev has changed or not.
Each Folder
- If folder is new:
- Check name against text blacklist.
- If found:
- Mark it "noScan" when creating.
- Add a note which includes the matching blacklist line.
- If "noScan" is set:
- log that it was not scanned ("noScan" is currently the only possible reason for this).
- ...else...
- do "Each Entry" above for each entry in the folder's directory.