MCPcopy Index your code
hub / github.com/aws/aws-cli / _potential_locations

Method _potential_locations

awscli/botocore/loaders.py:457–471  ·  view source on GitHub ↗
(self, name=None, must_exist=False, is_dir=False)

Source from the content-addressed store, hash-verified

455 return data
456
457 def _potential_locations(self, name=None, must_exist=False, is_dir=False):
458 # Will give an iterator over the full path of potential locations
459 # according to the search path.
460 for path in self.search_paths:
461 if os.path.isdir(path):
462 full_path = path
463 if name is not None:
464 full_path = os.path.join(path, name)
465 if not must_exist:
466 yield full_path
467 else:
468 if is_dir and os.path.isdir(full_path):
469 yield full_path
470 elif os.path.exists(full_path):
471 yield full_path
472
473 def is_builtin_path(self, path):
474 """Whether a given path is within the package's data directory.

Callers 3

list_api_versionsMethod · 0.95
load_data_with_pathMethod · 0.95

Calls 2

existsMethod · 0.80
isdirMethod · 0.45

Tested by

no test coverage detected