#include <cstdint>
#include <filesystem>
#include <string>
#include <vector>
Go to the source code of this file.
|
| std::filesystem::path | odCacheFilePath (const std::filesystem::path &data_dir, uint32_t vendor_id, uint32_t product_code, uint32_t revision) |
| | Returns the path of the object dictionary cache file of a device.
|
| OdCacheClearResult | clearOdCache (const std::filesystem::path &data_dir) |
| | Deletes every object dictionary cache file in the data directory.
|
◆ clearOdCache()
Deletes every object dictionary cache file in the data directory.
Only files with the layout of odCacheFilePath() are deleted. Other files in the data directory are not touched. A vendor or product folder that is empty afterwards is deleted as well.
- Parameters
-
| data_dir | The data directory, see –data-dir. A directory that does not exist holds no cache, and the result is empty. |
- Returns
- The deleted files and the files that could not be deleted.
◆ odCacheFilePath()
| std::filesystem::path odCacheFilePath |
( |
const std::filesystem::path & | data_dir, |
|
|
uint32_t | vendor_id, |
|
|
uint32_t | product_code, |
|
|
uint32_t | revision ) |
Returns the path of the object dictionary cache file of a device.
The file is <data-dir>/0x<vendor>/0x<product>/0x<revision>.json, with each number written as 8 lowercase hex digits.
- Parameters
-
| data_dir | The data directory, see –data-dir. |
| vendor_id | The vendor ID from the SII. |
| product_code | The product code from the SII. |
| revision | The revision number from the SII. |
- Returns
- The path of the cache file. The file need not exist.