| 1 | = Physical file management = |
| 2 | |
| 3 | The standard mode of file access on a BOINC client is: |
| 4 | |
| 5 | * '''Physical''' files exist in the projects/URL directory. BOINC keeps track of all physical files, and deletes them when no longer needed. |
| 6 | * '''Logical''' files are links in the slots/N directory, and refer to physical files. Applications are free to create other files in their slot directory; BOINC doesn't know about these, other than to delete them when the app finishes. |
| 7 | |
| 8 | It's also possible for applications to create and access files in the project/URL directory. |
| 9 | BOINC doesn't know about these files, and in particular it won't delete them |
| 10 | until the user detaches your project. |
| 11 | Some cases where you might want to do this: |
| 12 | |
| 13 | * Your application uses a large number of files, and you supply these as a single zip file that is unpacked by your application (using the [FileCompression#boinc-zip boinc_zip library]. If you store them in your project directory, you'll only need to do this unpacking once. |
| 14 | * Your application generates a lot of files that are shared between workunits. |
| 15 | |
| 16 | In order to put files in the project directory, you need to know where it is. |
| 17 | This can be found by calling [BasicApi#Communicatingwiththecoreclient boinc_get_init_data()]; |
| 18 | the directory is in APP_INIT_DATA.project_dir. |