Helper method to check the existance of a file.
@param the full path and name of the file to be checked.
@return true if file exists, false otherwise.
541848
private boolean checkFile(String pstrFile)
    {
        boolean blnRet  = false;
        File    objFile = null;

        try
        {
            objFile = new CSFile(pstrFile);
            blnRet = (objFile.exists() && objFile.isFile());
        }
        catch (Exception e)
        {
            blnRet = false;
        }
        finally
        {
            if (objFile != null) objFile = null;
        }
        return blnRet;
    }
557220
def file_exists(self) -> bool:
        
        cfg_path = self.file_path
        assert cfg_path

        return path.isfile(cfg_path)
149159
public boolean exists(final File file) {
        if (System.getSecurityManager() == null)
            return file.exists();
        return AccessController.doPrivileged(new PrivilegedAction<Boolean>() {
            @Override
            public Boolean run() {
                return file.exists() ? Boolean.TRUE : Boolean.FALSE;
            }
        }, controlContext).booleanValue();
    }
370337
public boolean exists(String path) {
        Iterator i = vHostTable.keySet().iterator();

        while (i.hasNext()) {
            try {
                String pattern = (String) i.next();
                // System.out.println("Pattern = "+pattern);
                if (path.matches(pattern))
                    return true;
            } catch (Exception e) {
                if (tc.isDebugEnabled()) {
                    Tr.debug(tc, "Caught an exception in exists():", e);
                }
                return false;
            }
        }

        return false;
    }
1117914
public boolean exists (HttpServletRequest req, String path)
    {
        return (getMessage(req, path, false) != null);
    }
1254266
def check_file_path(self, path):
        
        if os.path.exists(path) is not True:
            msg = "File Not Found {}".format(path)
            raise OSError(msg)
872281
def _file_exists(path, filename):
  """"""
  return os.path.isfile(os.path.join(path, filename))
1316221
def _valid_file(self, base, name):
        """"""

        valid = False
        fullpath = os.path.join(base, name)
        if self.file_check is not None and self.compare_file(fullpath[self._base_len:] if self.file_pathname else name):
            valid = True
        if valid and (not self.show_hidden and util.is_hidden(fullpath)):
            valid = False
        return self.on_validate_file(base, name) if valid else valid
518832
protected boolean fileExists()
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "fileExists", this);

        boolean fileAlreadyExists = true;

        File file = new File(_logDirectory, _fileName);
        fileAlreadyExists = (file.exists() && (file.length() > 0));

        if (tc.isEntryEnabled())
            Tr.exit(tc, "fileExists", new Boolean(fileAlreadyExists));
        return fileAlreadyExists;
    }
51814
public boolean isSameFile(JimfsPath path, FileSystemView view2, JimfsPath path2)
      throws IOException {
    if (!isSameFileSystem(view2)) {
      return false;
    }

    store.readLock().lock();
    try {
      File file = lookUp(path, Options.FOLLOW_LINKS).fileOrNull();
      File file2 = view2.lookUp(path2, Options.FOLLOW_LINKS).fileOrNull();
      return file != null && Objects.equals(file, file2);
    } finally {
      store.readLock().unlock();
    }
  }
271112
public boolean pathExists(String path)
    {
        String[] pathElements = path.split("/");
        ZConfig current = this;
        for (String pathElem : pathElements) {
            if (pathElem.isEmpty()) {
                continue;
            }
            current = current.children.get(pathElem);
            if (current == null) {
                return false;
            }
        }
        return true;
    }
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
267824
public boolean sourceExists(String name) {

        if (name != null && name.equals(getTemplateName())) {
            return true;
        }

        // Look for a .tea file
        return super.sourceExists(name);
    }
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()
618041
public boolean isAssetFile(File path) {
        boolean isAsset = false;

        try {
            if(FileUtil.directoryOnlyIfNotIgnored(path.getParentFile())) {
                if (FileUtil.isFileInDirectory(path, config.getAssetFolder())) {
                    isAsset = true;
                } else if (FileUtil.isFileInDirectory(path, config.getContentFolder())
                    && FileUtil.getNotContentFileFilter().accept(path)) {
                    isAsset = true;
                }
            }
        } catch (IOException ioe) {
            LOGGER.error("Unable to determine the path to asset file {}", path.getPath(), ioe);
        }
        return isAsset;
    }
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)
1276310
public static boolean isValid(final String name) {
        if (name == null) {
            return true;
        }
        for (final FileOrder fo : INSTANCES) {
            if (fo.name.equals(name)) {
                return true;
            }
        }
        return false;
    }