MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / getLastUsedDir

Function getLastUsedDir

source/MRViewer/MRFileDialog.cpp:690–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

688static const std::string cLastUsedDirKey = "lastUsedDir";
689
690std::filesystem::path getLastUsedDir()
691{
692 auto& cfg = Config::instance();
693 if ( cfg.hasJsonValue( cLastUsedDirKey ) )
694 {
695 auto lastUsedDir = cfg.getJsonValue( cLastUsedDirKey );
696 if ( lastUsedDir.isString() )
697 return pathFromUtf8( lastUsedDir.asString() );
698 }
699 return {};
700}
701
702void setLastUsedDir( const std::filesystem::path& folder )
703{

Callers 2

windowsDialogFunction · 0.85
gtkDialogFunction · 0.85

Calls 4

instanceFunction · 0.85
pathFromUtf8Function · 0.85
hasJsonValueMethod · 0.80
getJsonValueMethod · 0.80

Tested by

no test coverage detected