MCPcopy Create free account
hub / github.com/Geant4/geant4 / ListDirectory

Method ListDirectory

source/interfaces/core/src/G4VBasicShell.cc:333–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

331}
332
333void G4VBasicShell::ListDirectory(const G4String& newCommand) const
334{
335 G4String targetDir;
336 if (newCommand.length() <= 3) {
337 targetDir = GetCurrentWorkingDirectory();
338 }
339 else {
340 const G4String& newPrefix = newCommand.substr(3, newCommand.length() - 3);
341 targetDir = G4StrUtil::strip_copy(newPrefix);
342 }
343 G4UIcommandTree* commandTree = FindDirectory(targetDir);
344 if (commandTree == nullptr) {
345 G4cout << "Directory <" << targetDir << "> is not found." << G4endl;
346 }
347 else {
348 commandTree->ListCurrent();
349 }
350}
351void G4VBasicShell::TerminalHelp(const G4String& newCommand)
352{
353 G4UImanager* UI = G4UImanager::GetUIpointer();

Callers

nothing calls this directly

Calls 3

substrMethod · 0.80
ListCurrentMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected