Return whether or not the given dir contains a build.
7327
def is_build_dir(self, folder_name):
        """"""
        # Cannot move up to base scraper due to parser.entries call in
        # get_build_info_for_date (see below)

        url = '%s/' % urljoin(self.base_url, self.monthly_build_list_regex, folder_name)
        if self.application in APPLICATIONS_MULTI_LOCALE \
                and self.locale != 'multi':
            url = '%s/' % urljoin(url, self.locale)

        parser = self._create_directory_parser(url)

        pattern = re.compile(self.binary_regex, re.IGNORECASE)
        for entry in parser.entries:
            try:
                pattern.match(entry).group()
                return True
            except Exception:
                # No match, continue with next entry
                continue
        return False
397855
function isExcludedFromBuild(node) {
	if (node.load.excludeFromBuild) {
		return true;
	}

	if (
		node.load.metadata &&
		node.load.metadata.hasOwnProperty("bundle") &&
		node.load.metadata.bundle === false
	) {
		return true;
	}

	if (
		node.isPlugin &&
		!node.value.includeInBuild &&
		!node.load.metadata.includeInBuild
	) {
		return true;
	}

	return false;
}
85329
def has_directory(self, name: str):
        '''
        
        '''
        return os.path.isdir(self._path / name)
11178
def directory_exists(self, directory):
        """"""
        file_list = []
        self.session.retrlines('LIST', file_list.append)
        return any(f.split()[-1] == directory and f.upper().startswith('D') for f in file_list)
1219937
def is_valid_dir(path):
    '''  '''
    return os.path.exists(path) and os.path.isdir(path)
1102393
def is_filtered(self, relpath):
        """"""
        # Only include files under the parent_dir
        if relpath.startswith("../"):
            return True

        # Ignore files that we don't want timestamps from
        if self.timestamps_for is not None and type(self.timestamps_for) is list:
            match = False
            for line in self.timestamps_for:
                if fnmatch.fnmatch(relpath, line):
                    match = True
                    break
            if not match:
                return True

        # Matched is true by default if
        # * Have exclude
        # * No exclude and no include
        matched = self.exclude or not any([self.exclude, self.include])

        # Anything not matching exclude gets included
        if self.exclude:
            for line in self.exclude:
                if fnmatch.fnmatch(relpath, line):
                    matched = False

        # Anything matching include gets included
        if self.include:
            for line in self.include:
                if fnmatch.fnmatch(relpath, line):
                    matched = True
                    break

        return not matched
561225
def is_repository_directory(cls, path):
        # type: (str) -> bool
        
        logger.debug('Checking in %s for %s (%s)...',
                     path, cls.dirname, cls.name)
        return os.path.exists(os.path.join(path, cls.dirname))
49785
def _IsDirectory(parent, item):
  """"""
  return tf.io.gfile.isdir(os.path.join(parent, item))
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
1275216
def is_train_dir(dir_: str) -> bool:
    """"""
    return path.exists(path.join(dir_, CXF_CONFIG_FILE)) and \
           path.exists(path.join(dir_, CXF_TRACE_FILE)) and \
           path.exists(path.join(dir_, CXF_LOG_FILE))
1214659
def DirContains(self,f) :
        
        def match(fsNode) :
            if not fsNode.isdir() : return False 
            for c in fsNode.children() :
                if f(c) : return True
            return False
        return self.make_return(match)
1227206
def contains_vasp_input(dir_name):
    
    for f in ["INCAR", "POSCAR", "POTCAR", "KPOINTS"]:
        if not os.path.exists(os.path.join(dir_name, f)) and \
                not os.path.exists(os.path.join(dir_name, f + ".orig")):
            return False
    return True
130981
function isExist(dir) {
  dir = path.normalize(dir);
  try {
    fs.accessSync(dir, fs.R_OK);
    return true;
  } catch (e) {
    return false;
  }
}
669950
def check_build_layout(self):
        '''
        '''
        self.info('Ensure build layout')

        if not exists(self.specfilename):
            print('No {0} found in the current directory. Abandon.'.format(
                self.specfilename))
            exit(1)

        # create global dir
        self.mkdir(self.global_buildozer_dir)
        self.mkdir(self.global_cache_dir)

        # create local .buildozer/ dir
        self.mkdir(self.buildozer_dir)
        # create local bin/ dir
        self.mkdir(self.bin_dir)

        self.mkdir(self.applibs_dir)
        self.state = JsonStore(join(self.buildozer_dir, 'state.db'))

        target = self.targetname
        if target:
            self.mkdir(join(self.global_platform_dir, target, 'platform'))
            self.mkdir(join(self.buildozer_dir, target, 'platform'))
            self.mkdir(join(self.buildozer_dir, target, 'app'))
573988
def ensure_dir_exists(verify_dir):
    """"""
    if not os.path.exists(verify_dir):
        # Doesn't exist create dir
        os.makedirs(verify_dir)
    else:
        # Exists
        if not os.path.isdir(verify_dir):
            # Not a dir, raise an exception
            raise ValueError("{} is not a directory".format(verify_dir))
707023
def contains(bank, key, cachedir):
    '''
    
    '''
    if key is None:
        base = os.path.join(cachedir, os.path.normpath(bank))
        return os.path.isdir(base)
    else:
        keyfile = os.path.join(cachedir, os.path.normpath(bank), '{0}.p'.format(key))
        return os.path.isfile(keyfile)
1215007
def isdir(self, dirname):
        """"""
        client = boto3.client("s3")
        bucket, path = self.bucket_and_path(dirname)
        if not path.endswith("/"):
            path += "/"  # This will now only retrieve subdir content
        r = client.list_objects(Bucket=bucket, Prefix=path, Delimiter="/")
        if r.get("Contents") or r.get("CommonPrefixes"):
            return True
        return False