FileManager » History » Version 7
Greg Burri, 05/28/2010 03:51 PM
| 1 | 1 | Greg Burri | h1. FileManager |
|---|---|---|---|
| 2 | |||
| 3 | h2. Algorithms |
||
| 4 | |||
| 5 | * [[Algorithms#Searching]] |
||
| 6 | |||
| 7 | 2 | Greg Burri | h2. Sharing |
| 8 | |||
| 9 | 1 | Greg Burri | There is two type of shared directory : |
| 10 | |||
| 11 | # Readonly : The content will only be uploaded. |
||
| 12 | # Read and write : New downloaded file goes here. |
||
| 13 | |||
| 14 | * Two same directories cannot be shared. |
||
| 15 | * A shared directory can be a subdirectory of an existing share |
||
| 16 | * A shared directory can contains an existing share |
||
| 17 | |||
| 18 | Symlinks : pay attention ... |
||
| 19 | 3 | Greg Burri | |
| 20 | |||
| 21 | h3. Starting process |
||
| 22 | |||
| 23 | 5 | Greg Burri | The process begin in @FileManager::FileManager()@. |
| 24 | 3 | Greg Burri | |
| 25 | # Load the cache (proto buff) -> *c*. |
||
| 26 | # Give *c* to the cache. |
||
| 27 | 5 | Greg Burri | # The cache create shared directories (@SharedDirectory@) -> *S*, sub directories (@Directory@) and files (@File@) according *c*. |
| 28 | 4 | Greg Burri | # For each *s* in *S* : |
| 29 | 5 | Greg Burri | ** @fileUpdater->addRoot(s)@ (via signals). |
| 30 | # @fileUpdater->start()@ // Start the file updater daemon (thread). |
||
| 31 | ** For each *s* in *S* : |
||
| 32 | 7 | Greg Burri | *** @scan(s)@ // Read all directories and files from the file system. |
| 33 | 5 | Greg Burri | *** @restoreFromFile(s)@ // Give the known hashes from *c* to the corresponding files. |