Returns true if a task file exists in this directory
327489
def _task_file_exists(self, task_fs):
        
        for filename in ["task.{}".format(ext) for ext in self.get_available_task_file_extensions()]:
            if task_fs.exists(filename):
                return True
        return False
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
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()
447741
function exists(fileOrDir) {
  let stats;
  try {
    stats = statSync(fileOrDir);
    return stats.isFile() || stats.isDirectory();
  } catch (err) {
    return false;
  }
}
714189
def _check_file_existence(self, files):
        ''''''
        for f in files:
            if not os.path.isfile(f):
                logging.error("The file '%s' does not appear to exist, stopping" % f)
                exit(1)
748617
def assure_directory_exists(path, is_file=False):
    """"""
    if is_file:
        path = osp.dirname(path)
    # END handle file
    if not osp.isdir(path):
        os.makedirs(path)
        return True
    return False
224432
function fileExists(file) {
    var fileExists = true;

    try {
        fs.statSync(file, function(err, stat) {
            if (err == null) {
                fileExists = true;
            } else {
                fileExists = false;
            }
        });
    } catch (e) {
        fileExists = false;
    }

    return fileExists;
}
1073260
def check_file_exists(self, remote_cmd="dir home"):
        """"""
        if self.direction == "put":
            remote_out = self.ssh_ctl_chan.send_command_expect(remote_cmd)
            search_string = r"Directory contents .*{}".format(self.dest_file)
            return bool(re.search(search_string, remote_out, flags=re.DOTALL))
        elif self.direction == "get":
            return os.path.exists(self.dest_file)
130899
def _file_and_exists(val, input_files):
    
    return ((os.path.exists(val) and os.path.isfile(val)) or
            val in input_files)
417034
def exists(self, filename):
        
        if is_package(filename):
            filepath = os.path.join(self.connection["mount_point"],
                                    "Packages", filename)
        else:
            filepath = os.path.join(self.connection["mount_point"],
                                    "Scripts", filename)
        return os.path.exists(filepath)
281167
def files_exist(self, file_paths):
    
    results = {}

    def exist_thunk(paths, interface):
      results.update(interface.files_exist(paths))

    if len(self._threads):
      for block in scatter(file_paths, len(self._threads)):
        self.put(partial(exist_thunk, block))
    else:
      exist_thunk(file_paths, self._interface)

    desc = 'Existence Testing' if self.progress else None
    self.wait(desc)

    return results
609328
def all_exist(filepaths):
  """"""
  for fname in filepaths:
    if not tf.gfile.Exists(fname):
      return False
  return True
1291553
def all_files_exist(file_list):
    
    all_exist = True
    for filename in file_list:
        all_exist = all_exist and os.path.isfile(filename)
    return all_exist
1287854
def track_exists(self, localdir):
        
        path = glob.glob(self.gen_localdir(localdir) +
                         self.gen_filename() + "*")
        if len(path) > 0 and os.path.getsize(path[0]) > 0:
            return True
        return False
1269986
function (path) {
    if (fs.existsSync(path) && fs.statSync(path).isDirectory()) {
      return true;
    }
    return false;
  }
1219937
def is_valid_dir(path):
    '''  '''
    return os.path.exists(path) and os.path.isdir(path)
1356187
def check_dirs():
    
    dirs = [MAIN_DIR, TEMP_DIR, DOWNLOAD_DIR, SAVESTAT_DIR]
    for directory in dirs:
        if directory.exists() and not directory.is_dir():
            raise FileExistsError(str(directory.resolve()) + " cannot be used as a directory.")