Check that definitions file is present, and that faces file is readable.
499016
def check_data(self):
        """"""
        assert os.path.exists(self.data_fp)
        if gis:
            with fiona.drivers():
                with fiona.open(self.faces_fp) as src:
                    assert src.meta

        gpkg_hash = json.load(open(self.data_fp))['metadata']['sha256']
        assert gpkg_hash == sha256(self.faces_fp)
963133
private function _checkfiles()
    {
        if (!file_exists($this->_plugin_base."js/".strtolower($this->_plugin_name).".js")) {
            $this->global_error->addError("file_exists(".$this->_plugin_base."js/".strtolower($this->_plugin_name).".js)", "JS-File for Plugin '".$this->_plugin_name."' is missing!");
        } else {
            if (!is_readable($this->_plugin_base."js/".strtolower($this->_plugin_name).".js")) {
                $this->global_error->addError("is_readable(".$this->_plugin_base."js/".strtolower($this->_plugin_name).".js)", "JS-File for Plugin '".$this->_plugin_name."' is not readable but present!");
            }
        }
        if (!file_exists($this->_plugin_base."lang/en.xml")) {
            $this->global_error->addError("file_exists(".$this->_plugin_base."lang/en.xml)", "At least an english translation must exist for the plugin!");
        } else {
            if (!is_readable($this->_plugin_base."lang/en.xml")) {
                $this->global_error->addError("is_readable(".$this->_plugin_base."js/".$this->_plugin_name.".js)", "The english translation can't be read but is present!");
            }
        }
    }
485124
def _has_definition(self):
        """"""
        footerReference = self._sectPr.get_footerReference(self._hdrftr_index)
        return False if footerReference is None else True
215608
def isfile(path, **kwargs):
    """"""
    import os.path
    return os.path.isfile(path, **kwargs)
397531
def check_file(self):
        
        try:
            image_type = ".{0}".format(self.image.split(".")[1])
            if image_type not in self.file_format:
                print("Format: '{0}' not recognized. Use one of "
                      "them:\n{1}".format(self.image.split(".")[1],
                                          ", ".join(self.file_format)))
                raise SystemExit()
        except IndexError:
            print("slpkg: Error: Image file suffix missing")
            raise SystemExit()
369605
def check(self, feature):
        """"""
        input = feature.input
        is_str = isa(str)
        is_nested_str = all_fn(
            iterable, lambda x: all(is_str, x))
        assert is_str(input) or is_nested_str(input)
646384
def make_file_readable (filename):
    """"""
    if not os.path.islink(filename):
        util.set_mode(filename, stat.S_IRUSR)
1308709
function isIgnoredFile(file) {
    if (options.ignore !== undefined) {
      var result = false;

      options.ignore.forEach(function(pattern) {
        if (minimatch(file, pattern)) {
          result = true;
          return false;
        }
      });

      return result;
    }

    return false;
  }
45851
def IsFileStatEntry(self, original_result):
    """"""
    return (original_result.pathspec.pathtype in [
        rdf_paths.PathSpec.PathType.OS, rdf_paths.PathSpec.PathType.TSK
    ])
738927
def isfile(self, relpath):
    """"""
    if self.isignored(relpath):
      return False
    return self._isfile_raw(relpath)
770397
private function check_env(){
		if( !is_file($this->config->path_definition_file) ){
			return 'Table definition file is NOT a file (or NOT exists).';
		}
		if( !is_readable($this->config->path_definition_file) ){
			return 'Table definition file is NOT readable.';
		}

		if( !is_dir($this->config->path_cache_dir) ){
			return 'path_cache_dir is NOT a directory (or NOT exists).';
		}
		if( !is_readable($this->config->path_definition_file) ){
			return 'path_cache_dir is NOT readable.';
		}
		if( !is_writable($this->config->path_definition_file) ){
			return 'path_cache_dir is NOT writable.';
		}
		return null;
	}
317324
def check_input_files_for_variadic_seq(headerDir, sourceDir):
    """"""
    # Check input files in include/source-directories.
    files  = glob.glob( os.path.join( headerDir, "*.hpp" ) )
    files += glob.glob( os.path.join( headerDir, "aux_", "*.hpp" ) )
    files += glob.glob( os.path.join( sourceDir, "src", "*" ) )
    for currentFile in sorted( files ):
        if check_header_comment( currentFile ):
            return True
    return False
851660
def is_readable(path=None):
    
    if os.path.isfile(path) and os.access(path, os.R_OK):
        return True
    return False
247119
def check(self):
    
    errors = []
    results = []
    for fn in self._files:
      if not os.path.isdir(fn):
        try:
          with open(fn, 'r') as f:
            line_ct = 1
            for line in f:
              for word in split_words(line):
                if (word in self._misspelling_dict or
                    word.lower() in self._misspelling_dict):
                  results.append([fn, line_ct, word])
              line_ct += 1
        except UnicodeDecodeError:
          pass
        except IOError:
          errors.append('%s' % sys.exc_info()[1])
    return errors, results
820634
private void readDefinitions()
   {
      for (MapRow row : m_tables.get("TTL"))
      {
         Integer id = row.getInteger("DEFINITION_ID");
         List<MapRow> list = m_definitions.get(id);
         if (list == null)
         {
            list = new ArrayList<MapRow>();
            m_definitions.put(id, list);
         }
         list.add(row);
      }

      List<MapRow> rows = m_definitions.get(WBS_FORMAT_ID);
      if (rows != null)
      {
         m_wbsFormat = new SureTrakWbsFormat(rows.get(0));
      }
   }
1196013
def CheckForUnknownFiles(self):
		""""""
		unknown_files = self.GetUnknownFiles()
		if unknown_files:
			print "The following files are not added to version control:"
			for line in unknown_files:
				print line
			prompt = "Are you sure to continue?(y/N) "
			answer = raw_input(prompt).strip()
			if answer != "y":
				ErrorExit("User aborted")
436808
async function detectFaces(inputFile) {
  // Make a call to the Vision API to detect the faces
  const request = {image: {source: {filename: inputFile}}};
  const results = await client.faceDetection(request);
  const faces = results[0].faceAnnotations;
  const numFaces = faces.length;
  console.log(`Found ${numFaces} face${numFaces === 1 ? '' : 's'}.`);
  return faces;
}