MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / writeImage

Method writeImage

src/gui2/datastore.cc:662–686  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660}
661
662void Datastore::writeImage(const std::fs::path& path)
663{
664 Events::OperationStart::post("fluxengine.view.status.writeImage"_lang);
665 Datastore::runOnWorkerThread(
666 [=]
667 {
668 busy = true;
669 failed = false;
670 DEFER(wtOperationStop());
671
672 try
673 {
674 wtRebuildConfiguration(true);
675 wtWaitForUiThreadToCatchUp();
676 globalConfig().setImageWriter(path.string());
677 ImageWriter::create(globalConfig())
678 ->writeImage(*Datastore::getDisk()->image);
679 }
680 catch (...)
681 {
682 failed = true;
683 throw;
684 }
685 });
686}
687
688void Datastore::readImage(const std::fs::path& path)
689{

Callers 1

OnSaveImageButtonMethod · 0.45

Calls 5

runOnWorkerThreadFunction · 0.85
wtOperationStopFunction · 0.85
wtRebuildConfigurationFunction · 0.85
setImageWriterMethod · 0.80

Tested by

no test coverage detected