MCPcopy Create free account
hub / github.com/aws/aws-cli / is_builtin_path

Method is_builtin_path

awscli/botocore/loaders.py:473–486  ·  view source on GitHub ↗

Whether a given path is within the package's data directory. This method can be used together with load_data_with_path(name) to determine if data has been loaded from a file bundled with the package, as opposed to a file in a separate location. :type path: str

(self, path)

Source from the content-addressed store, hash-verified

471 yield full_path
472
473 def is_builtin_path(self, path):
474 """Whether a given path is within the package's data directory.
475
476 This method can be used together with load_data_with_path(name)
477 to determine if data has been loaded from a file bundled with the
478 package, as opposed to a file in a separate location.
479
480 :type path: str
481 :param path: The file path to check.
482
483 :return: Whether the given path is within the package's data directory.
484 """
485 path = os.path.expanduser(os.path.expandvars(path))
486 return path.startswith(self.BUILTIN_DATA_PATH)
487
488
489class ExtrasProcessor:

Callers 2

test_is_builtin_pathMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_is_builtin_pathMethod · 0.76