MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / InitPath

Method InitPath

src/CacheDisk.cpp:58–77  ·  view source on GitHub ↗

Initialize cache directory

Source from the content-addressed store, hash-verified

56
57// Initialize cache directory
58void CacheDisk::InitPath(std::string cache_path) {
59 QString qpath;
60
61 if (!cache_path.empty()) {
62 // Init QDir with cache directory
63 qpath = QString(cache_path.c_str());
64
65 } else {
66 // Init QDir with user's temp directory
67 qpath = QDir::tempPath() + QString("/preview-cache/");
68 }
69
70 // Init QDir with cache directory
71 path = QDir(qpath);
72
73 // Check if cache directory exists
74 if (!path.exists())
75 // Create
76 path.mkpath(qpath);
77}
78
79// Default destructor
80CacheDisk::~CacheDisk()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected