MCPcopy Create free account
hub / github.com/amsynth/amsynth / createUserBank

Method createUserBank

src/core/synth/PresetController.cpp:494–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494bool PresetController::createUserBank(const std::string &name)
495{
496 auto path = filesystem::get().user_banks + "/" + name + ".bank";
497 if (std::ifstream(path, std::ios::in).is_open())
498 return false;
499 auto file = std::ofstream(path, std::ios::out);
500 if (!file.is_open())
501 return false;
502 file << "amSynth\nEOF\n";
503 file.close();
504 return true;
505}

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected