-
Notifications
You must be signed in to change notification settings - Fork 449
PhysicalFileManagement
Vitalii Koshura edited this page Feb 28, 2023
·
2 revisions
The standard mode of file access on a BOINC client is:
- Physical files exist in the projects/URL directory. BOINC keeps track of all physical files, and deletes them when no longer needed.
- 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.
It's also possible for applications to create and access files in the project/URL directory. BOINC doesn't know about these files, and in particular it won't delete them until the user detaches your project. Some cases where you might want to do this:
- Your application uses a large number of files, and you supply these as a single archive that is unpacked by your application (for example, using the boinc_zip library). If you store them in your project directory, you'll only need to do this unpacking once.
- Your application generates a lot of files that are shared between workunits.
In order to put files in the project directory, you need to know where it is.
This can be found by calling boinc_get_init_data();
the directory is in APP_INIT_DATA.project_dir
.