MCPcopy Create free account
hub / github.com/duckdb/duckdb / ChangeDirectory

Function ChangeDirectory

tools/shell/shell_metadata_command.cpp:34–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34MetadataResult ChangeDirectory(ShellState &state, const vector<string> &args) {
35 if (state.safe_mode) {
36 state.PrintF(PrintOutput::STDERR, ".cd cannot be used in -safe mode\n");
37 return MetadataResult::FAIL;
38 }
39 auto result = state.ChangeDirectory(args[1]);
40 return result == SuccessState::SUCCESS ? MetadataResult::SUCCESS : MetadataResult::FAIL;
41}
42
43MetadataResult ToggleChanges(ShellState &state, const vector<string> &args) {
44 state.SetOrClearFlag(ShellFlags::SHFLG_CountChanges, args[1]);

Callers

nothing calls this directly

Calls 2

ChangeDirectoryMethod · 0.80
PrintFMethod · 0.45

Tested by

no test coverage detected