MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / glob0

Function glob0

utility/glob.cpp:379–397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377}
378
379Vector<String> glob0(const String &dirname, const String &basename,
380 bool dironly, bool include_hidden) {
381 // std::cout << "In glob0\n";
382 Vector<String> result;
383 if (basename.is_empty()) {
384 // 'q*x/' should match only directories.
385 if (dir_exists(dirname, include_hidden)) {
386 result = { basename };
387 }
388 } else {
389 if (dir_or_file_exists(dirname.path_join(basename), include_hidden)) {
390 result = { basename };
391 }
392 }
393 if (!result.is_empty() && dirname.is_absolute_path()) {
394 result = { basename.is_empty() ? dirname : dirname.path_join(basename) };
395 }
396 return result;
397}
398
399String get_user_home_dir() {
400 auto ident = OS::get_singleton()->get_identifier();

Callers

nothing calls this directly

Calls 2

dir_existsFunction · 0.85
dir_or_file_existsFunction · 0.85

Tested by

no test coverage detected