Checks whether config file exists in directory.

@param dirPath the dir path
@return true, if successful
964146
public static boolean hasConfigFileExists(String dirPath) {
        String filePath = dirPath + File.separator + Configurations.CONFIG_FILE_NAME + ".";
        if (AuditUtil.isFileExists(filePath + Configurations.YML_EXTENTION)
                || AuditUtil.isFileExists(filePath + Configurations.YAML_EXTENTION)
                || AuditUtil.isFileExists(filePath + Configurations.XML_EXTENTION)) {
            return true;
        }
        return false;
    }
58216
private boolean isDirectoryTraverse(StringBuffer path)
	{
			
		boolean directoryTraverse = false;
			
		String matchString = path.toString();
			
		//PM82876 Start
		if (WCCustomProperties.ALLOW_DOTS_IN_NAME) {
		    // The fileName can have .. , check for the failing conditions only.
		    if (matchString.indexOf("..") > -1) {
		        if( (matchString.indexOf("/../") > -1) || (matchString.indexOf("\\..\\") > -1) || 
		                        matchString.startsWith("../") || matchString.endsWith("/..") || 
		                        matchString.startsWith("..\\")|| matchString.endsWith("\\..")) 
		        {
		            directoryTraverse = true;
		            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
		                logger.logp(Level.FINE, CLASS_NAME, "isDirectoryTraverse", "bad path :" + matchString);
		        }
		    }    
		}
                else{//PM82876 End

                    /**
                     * Do not allow ".." to appear in a path as it allows one to serve files from anywhere within
                     * the file system.
                     * Also check to see if the path or URI ends with '/', '\', or '.' .
                     * PQ44346 - Allow files on DFS to be served.
                     */
                    if ( (matchString.lastIndexOf("..") != -1) && (!matchString.startsWith("/...") )) 
                    {
                        directoryTraverse = true;
                    }

                }
		if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
			logger.logp(Level.FINE, CLASS_NAME,"isDirectoryTraverse", "returning" + directoryTraverse + " , matchstring :" + matchString);
			
		return directoryTraverse;
	}
723137
private void checkForConfigPath(File configFile) {
        String desktopLayoutFilePath = configFile.getAbsolutePath();
        String configDirPath = desktopLayoutFilePath.substring(0, desktopLayoutFilePath.lastIndexOf(System
                .getProperty("file.separator")));
        File configDir = new File(configDirPath);

        // create config dir if it does not exist
        if (!configDir.exists()) {
            boolean success = configDir.mkdirs();
            if(success)
                logger.debug("Newly created config directory");
            else
                logger.warn("Could not create config directory");
        }
    }
1336178
public static boolean isFileExist(String filePath) {

        File f = new File(filePath);

        return f.exists() && !f.isDirectory();
    }
184011
public boolean containsProgramPath(String path) {
        return registryMap.containsKey(path) && registryMap.get(path).getProgram() != null;
    }
771489
public function exists(string $path) : bool
    {
        $explode = explode('/', $path);
        $config = $this->config;
        while ($element = array_shift($explode)) {
            if (!array_key_exists($element, $config)) {
                return false;
            }
            $config = $config[$element];
        }

        return true;
    }
1012184
public static File mkdir(String dirPath) {
		if (dirPath == null) {
			return null;
		}
		final File dir = file(dirPath);
		return mkdir(dir);
	}
574402
function isValidConfig(config) {
    return (config.root != null && config.root.length > 0) &&
            isNullOrFunction(config.directoryFilter) &&
            isNullOrFunction(config.filesFilter) &&
            isNullOrString(config.directoryFilterRegex) &&
            isNullOrString(config.filesFilterRegex);
}
258197
def is_dir_exists(dirpath):
        # type: (AnyStr) -> bool
        """"""
        if dirpath is None or not os.path.exists(dirpath) or not os.path.isdir(dirpath):
            return False
        else:
            return True
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;
    }
144185
function containsPath(self, dirname) {
  return self.__paths__.some(function(p) {
    return p === dirname.substr(0, p.length);
  });
}
232371
public boolean existFile(String path) {
		FTPFile[] ftpFileArr;
		try {
			ftpFileArr = client.listFiles(path);
		} catch (IOException e) {
			throw new FtpException(e);
		}
		if (ArrayUtil.isNotEmpty(ftpFileArr)) {
			return true;
		}
		return false;
	}
591781
def AddDir(self, dirpath):
    
    if dirpath not in self._dirs:
      self._dirs.add(dirpath)
      return True
    return False
1260641
public static boolean existsEx( Path path, LinkOption... options ) {
        if( Files.exists( path ) ) {
            return true;
        }

        if( options.length == 0 || !options[ 0 ].equals( NOFOLLOW_LINKS ) ) {
            return false;
        }

        try {
            Files.readSymbolicLink( path );
        } catch( IOException e ) {
            return false;
        }

        return true;
    }
430705
def ensure_dir_exists(cls, filepath):
        
        directory = os.path.dirname(filepath)
        if directory != '' and not os.path.exists(directory):
            try:
                os.makedirs(directory)
            except OSError as e:
                if e.errno != errno.EEXIST:
                    raise
3629
function exists(filepath) {
		var does = grunt.file.exists(filepath);
		if (!does) {
			grunt.log.error(
				'Human error: ' + chalk.cyan(filepath) + ' not found.'
			);
			grunt.fail.errorcount++;
		}
		return does;
	}
911723
public synchronized boolean contains(RelativePath path) {
        try {
            checkIndex();
            return getZipIndexEntry(path) != null;
        }
        catch (IOException e) {
            return false;
        }
    }