Returns True if a container exists at the specified path,
        otherwise False.

        :param path: str or Path instance
        :return:
        :rtype: bool
        :raises ValueError: A component of path is a field name.
430594
def contains_container(self, path):
        
        path = make_path(path)
        try:
            self.get_container(path)
            return True
        except KeyError:
            return False
792153
def isdir(self, path):
        
        try:
            self.remote_context.check_output(["test", "-d", path])
        except subprocess.CalledProcessError as e:
            if e.returncode == 1:
                return False
            else:
                raise
        return True
912615
def matches(self, path):
        
        path = self._prepare_path(path)
        return self.full_regex.search(path) is not None
1251741
def check_path(path):
    
    if path is None or path == b'' or path.startswith(b'/'):
        raise ValueError("illegal path '%s'" % path)

    if (
        (sys.version_info[0] >= 3 and not isinstance(path, bytes)) and
        (sys.version_info[0] == 2 and not isinstance(path, str))
    ):
        raise TypeError("illegale type for path '%r'" % path)

    return path
1324978
def CheckPathExists(path):
  
  i = 0
  root, ext = os.path.splitext(path)
  while os.path.exists(path):
    i = i + 1
    goodlogging.Log.Info("UTIL", "Path {0} already exists".format(path))
    path = "{0}_{1}".format(root, i) + ext
  return path
487494
def check_file_existence(path):
    

    pathvalidate.validate_file_path(path)

    if not os.path.lexists(path):
        raise FileNotFoundError(path)

    if os.path.isfile(path):
        logger.debug("file found: " + path)
        return FileType.FILE

    if os.path.isdir(path):
        logger.debug("directory found: " + path)
        return FileType.DIRECTORY

    if os.path.islink(path):
        logger.debug("link found: " + path)
        return FileType.LINK

    raise RuntimeError()
720171
def make_sure_path_exists(path):
    
    logger.debug('Making sure path exists: {}'.format(path))
    try:
        os.makedirs(path)
        logger.debug('Created directory at: {}'.format(path))
    except OSError as exception:
        if exception.errno != errno.EEXIST:
            return False
    return True
388091
def exists(self, path):
        
        (bucket, key) = self._path_to_bucket_and_key(path)

        # root always exists
        if self._is_root(key):
            return True

        # file
        if self._exists(bucket, key):
            return True

        if self.isdir(path):
            return True

        logger.debug('Path %s does not exist', path)
        return False
127921
def exists(self, path, **kwargs):
        """"""
        try:
            self.get_file_status(path, **kwargs)
            return True
        except HdfsFileNotFoundException:
            return False
1233282
def exists(self, path):
        
        _complain_ifclosed(self.closed)
        return self.fs.exists(path)
711367
def is_repo_instance(cls, path):
        
        try:
            cls.get_version(path)
            return True
        except subprocess.CalledProcessError:
            # Git returns non-zero status
            return False
        except OSError:
            # Git unavailable?
            return False
335295
def container_exists(self, id=None, name=None):
        
        exists = False
        if id and self.container_by_id(id):
            exists = True
        elif name and self.container_by_name(name):
            exists = True

        return exists
1096817
function exists(path, type) {
	try {
		switch (type){
			case "d": return FS.statSync(path).isDirectory();
			default:  return FS.statSync(path).isFile();
		}
	}
	catch (err) {
		return false;
	}
}
560955
def _is_path(instance, attribute, s, exists=True):
    ""
    if not s:
        # allow False as a default
        return
    if exists:
        if os.path.exists(s):
            return
        else:
            raise OSError("path does not exist")
    else:
        # how do we tell if it's a path if it doesn't exist?
        raise TypeError("Not a path?")
850292
def isproject(path):
    

    try:
        if os.path.basename(path)[0] in (".", "_"):
            return False
        if not os.path.isdir(path):
            return False
        if not any(fname in os.listdir(path)
                   for fname in ("templates.yaml",
                                 "inventory.yaml")):
            return False
    except:
        return False

    return True
1107577
def check_directory_path(self, path):
        
        if os.path.isdir(path) is not True:
            msg = "Directory Does Not Exist {}".format(path)
            raise OSError(msg)
1286899
def exists(path):
    """"""
    try:
        return path.expanduser().absolute().exists()
    except AttributeError:
        return os.path.exists(os.path.abspath(os.path.expanduser(str(path))))