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

Function dir_or_file_exists

utility/glob.cpp:275–286  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275bool dir_or_file_exists(const String &path, bool include_hidden = false) {
276 String basename = get_file_name(path);
277 Ref<DirAccess> da = DirAccess::open(get_real_base_dir(path));
278 if (da.is_null()) {
279 return false;
280 }
281 da->set_include_hidden(include_hidden);
282 if ((da->file_exists(basename) || da->dir_exists(basename))) {
283 return true;
284 }
285 return false;
286}
287
288Vector<String> filter(const Vector<String> &names,
289 const String &pattern) {

Callers 2

glob0Function · 0.85
_globMethod · 0.85

Calls 4

get_file_nameFunction · 0.85
get_real_base_dirFunction · 0.85
dir_existsMethod · 0.80
file_existsMethod · 0.45

Tested by

no test coverage detected