| | 1 | = Retrieving files = |
| | 2 | |
| | 3 | A persistent file can be retrieved from a specific host. This can be done using the function |
| | 4 | |
| | 5 | |
| | 6 | {{{ |
| | 7 | get_file(int host_id, const char* file_name) |
| | 8 | }}} |
| | 9 | or the command line program (run in the project root dir) |
| | 10 | |
| | 11 | |
| | 12 | {{{ |
| | 13 | get_file -host_id X -file_name Y |
| | 14 | }}} |
| | 15 | This program must be run in the project's root directory. get_file() creates a result with a name of the form: |
| | 16 | |
| | 17 | |
| | 18 | {{{ |
| | 19 | get_FILENAME_HOSTID_TIME |
| | 20 | }}} |
| | 21 | Example: get_test.mpg_34_123456789 is a result representing the upload of test.mpg from host number 34 at time 1234567891. |
| | 22 | |
| | 23 | An upload message is created for the specific host and added to the msg_to_host table in the database. This message instructs the client to upload the file and acknowledge a successful upload. The upload message included in the next RPC reply to the host. The message has the form: |
| | 24 | |
| | 25 | |
| | 26 | {{{ |
| | 27 | <app> |
| | 28 | <name>FILE_MOVER</name> |
| | 29 | </app> |
| | 30 | <app_version> |
| | 31 | <app_name>FILE_MOVER</app_name> |
| | 32 | <version_num>BOINC_MAJOR_VERSION</version_num> |
| | 33 | </app_version> |
| | 34 | <file_info> |
| | 35 | <name>file_name</name> |
| | 36 | <url>upload_dir</url> |
| | 37 | <max_nbytes>1e10</max_nbytes> |
| | 38 | <upload_when_present/> |
| | 39 | </file_info> |
| | 40 | RESULT_XML |
| | 41 | <workunit> |
| | 42 | <name>result.name</name> |
| | 43 | <app_name>FILE_MOVER</app_name> |
| | 44 | </workunit> |
| | 45 | }}} |
| | 46 | Include |
| | 47 | {{{<msg_to_host/>}}} |
| | 48 | in config.xml. Currently |
| | 49 | {{{<ignore_upload_certificates/>}}} |
| | 50 | needs to be included as there is no way to send upload certificates with these files. |