MCPcopy Create free account
hub / github.com/VCVRack/Rack / load

Method load

src/patch.cpp:299–319  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

297
298
299void Manager::load(std::string path) {
300 INFO("Loading patch %s", path.c_str());
301
302 clear();
303 clearAutosave();
304 system::createDirectories(autosavePath);
305
306 if (isPatchLegacyV1(path)) {
307 // Copy the .vcv file directly to "patch.json".
308 system::copy(path, system::join(autosavePath, "patch.json"));
309 }
310 else {
311 // Extract the .vcv file as a .tar.zst archive.
312 double startTime = system::getTime();
313 system::unarchiveToDirectory(path, autosavePath);
314 double endTime = system::getTime();
315 INFO("Unarchived patch in %lf seconds", (endTime - startTime));
316 }
317
318 loadAutosave();
319}
320
321
322void Manager::loadTemplate() {

Callers 2

create_manifestFunction · 0.45
create_moduleFunction · 0.45

Calls 6

createDirectoriesFunction · 0.85
isPatchLegacyV1Function · 0.85
copyFunction · 0.85
getTimeFunction · 0.85
unarchiveToDirectoryFunction · 0.85
joinFunction · 0.70

Tested by

no test coverage detected