Function to check existence of a file entry, validity of markers
@private
164556
function _validateFrame(entry) {
        var deferred = new $.Deferred(),
            fileEntry = FileSystem.getFileForPath(entry.filePath);

        if (entry.inMem) {
            var indexInWS = MainViewManager.findInWorkingSet(entry.paneId, entry.filePath);
            // Remove entry if InMemoryFile is not found in Working set
            if (indexInWS === -1) {
                deferred.reject();
            } else {
                deferred.resolve();
            }
        } else {
            fileEntry.exists(function (err, exists) {
                if (!err && exists) {
                    // Additional check to handle external modification and mutation of the doc text affecting markers
                    if (fileEntry._hash !== entry._hash) {
                        deferred.reject();
                    } else if (!entry._validateMarkers()) {
                        deferred.reject();
                    } else {
                        deferred.resolve();
                    }
                } else {
                    deferred.reject();
                }
            });
        }

        return deferred.promise();
    }
1146657
function checkFile( path ) {
            if ( typeof path === "undefined" || ! grunt.file.exists( path ) ) {
                grunt.log.error( "Source file \"" + path + "\" not found." );
                return false;
            }

            return true;
        }
248302
function isValid (path, entry) {
        var isValid = valid(path)
        if (isValid) {
          log.verbose('extracted file from tarball', path)
          extractCount++
        } else {
          // invalid
          log.silly('ignoring from tarball', path)
        }
        return isValid
      }
1195924
function ensureExists(path, mask, cb) {
    if (typeof mask == 'function') {
        cb = mask;
        mask = 0777;
    }

    filesystem.mkdir(path, mask, function(err) {
        if (err) {
            if (err.code == 'EEXIST') cb(null);
            else cb(err);
        } else cb(null);
    });
}
469487
function tryFile(fileName, failedLookupLocation, onlyRecordFailures, state) {
        if (!onlyRecordFailures && state.host.fileExists(fileName)) {
            if (state.traceEnabled) {
                ts.trace(state.host, ts.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName);
            }
            return fileName;
        }
        else {
            if (state.traceEnabled) {
                ts.trace(state.host, ts.Diagnostics.File_0_does_not_exist, fileName);
            }
            failedLookupLocation.push(fileName);
            return undefined;
        }
    }
257668
function isFile(p) {
    if (!fs.existsSync(p)) {
        return false;
    }
    try {
        let stats = fs.statSync(p);
        return stats.isFile();
    } catch (e) {
        return false;
    }
}
620467
function validateFile(path, rollCall) {
	var stat = path ? fs.statSync(path) : {
		size : 0
	};
	if (!stat.size) {
		rollCall.error('Failed to find any entries in "' + path + '" (file size: ' + stat.size + ')');
		return false;
	}
	return true;
}
202769
async function fileExists(f) {
  debug(`fileExists called with: ${JSON.stringify(arguments)}`);
  try {
    await fs.statAsync(f);
    return f;
  } catch (e) {
    throw e;
  }
}
994783
def _HasFile(self, file_name):
    """"""
    if self._zip:
      return file_name in self._zip.namelist()
    else:
      file_path = os.path.join(self._path, file_name)
      return os.path.exists(file_path) and os.path.isfile(file_path)
701505
def check_file_presence
      spec.icons.values.each do |path|
        fail_if_not_exist "Icon", path
      end

      if spec.browser_action
        fail_if_not_exist "Browser action popup", spec.browser_action.popup
        fail_if_not_exist "Browser action icon", spec.browser_action.icon
      end

      if spec.page_action
        fail_if_not_exist "Page action popup", spec.page_action.popup
        fail_if_not_exist "Page action icon", spec.page_action.icon
      end

      if spec.packaged_app
        fail_if_not_exist "App launch page", spec.packaged_app.page
      end

      spec.content_scripts.each do |content_script|
        content_script.javascripts.each do |script_path|
          fail_if_not_exist "Content script javascript", script_path
        end
        content_script.stylesheets.each do |style_path|
          fail_if_not_exist "Content script style", style_path
        end
      end

      spec.background_scripts.each do |script_path|
        fail_if_not_exist "Background script style", script_path
      end

      fail_if_not_exist "Background page", spec.background_page
      fail_if_not_exist "Options page", spec.options_page

      spec.web_intents.each do |web_intent|
        fail_if_not_exist "Web intent href", web_intent.href
      end

      spec.nacl_modules.each do |nacl_module|
        fail_if_not_exist "NaCl module", nacl_module.path
      end

      spec.web_accessible_resources.each do |path|
        fail_if_not_exist "Web accessible resource", path
      end
    end
103558
def __check_file_status(self, index):
        """"""
        if self.__file_status_flag:
            # Avoid infinite loop: when the QMessageBox.question pops, it
            # gets focus and then give it back to the CodeEditor instance,
            # triggering a refresh cycle which calls this method
            return
        self.__file_status_flag = True

        finfo = self.data[index]
        name = osp.basename(finfo.filename)

        if finfo.newly_created:
            # File was just created (not yet saved): do nothing
            # (do not return because of the clean-up at the end of the method)
            pass

        elif not osp.isfile(finfo.filename):
            # File doesn't exist (removed, moved or offline):
            self.msgbox = QMessageBox(
                    QMessageBox.Warning,
                    self.title,
                    _("<b>%s</b> is unavailable "
                      "(this file may have been removed, moved "
                      "or renamed outside Spyder)."
                      "<br>Do you want to close it?") % name,
                    QMessageBox.Yes | QMessageBox.No,
                    self)
            answer = self.msgbox.exec_()
            if answer == QMessageBox.Yes:
                self.close_file(index)
            else:
                finfo.newly_created = True
                finfo.editor.document().setModified(True)
                self.modification_changed(index=index)

        else:
            # Else, testing if it has been modified elsewhere:
            lastm = QFileInfo(finfo.filename).lastModified()
            if to_text_string(lastm.toString()) \
               != to_text_string(finfo.lastmodified.toString()):
                if finfo.editor.document().isModified():
                    self.msgbox = QMessageBox(
                        QMessageBox.Question,
                        self.title,
                        _("<b>%s</b> has been modified outside Spyder."
                          "<br>Do you want to reload it and lose all "
                          "your changes?") % name,
                        QMessageBox.Yes | QMessageBox.No,
                        self)
                    answer = self.msgbox.exec_()
                    if answer == QMessageBox.Yes:
                        self.reload(index)
                    else:
                        finfo.lastmodified = lastm
                else:
                    self.reload(index)

        # Finally, resetting temporary flag:
        self.__file_status_flag = 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)
727962
def do_files_exist(filenames):
  """"""
  preexisting = [tf.io.gfile.exists(f) for f in filenames]
  return any(preexisting)
767019
function(file) {
    var filePath = path.resolve(file);

    if (filePath) {
      if (!fs.existsSync(filePath)) {
        fse.ensureFileSync(filePath);
      }
      return filePath;
    }

    return false;
  }
389428
def check_existance(f):
    """"""
    if not opath.isfile(f):
        logging.error("Nanoget: File provided doesn't exist or the path is incorrect: {}".format(f))
        sys.exit("File provided doesn't exist or the path is incorrect: {}".format(f))
794347
def verify_file_exists(file_name, file_location):
    
    return __os.path.isfile(__os.path.join(file_location, file_name))
504505
function isExistingFile(filename) {
    try {
        return fs.statSync(filename).isFile();
    } catch (err) {
        if (err.code === "ENOENT") {
            return false;
        }
        throw err;
    }
}