Return if the file is a resource file by its extension.

@param lcasefn file name in lower case.
@return {@code true} if file is a resource file, otherwise {@code false}
540771
@Deprecated
    public static boolean isResourceFile(final String lcasefn) {
        for (final String ext: supportedResourceExtensions) {
            if (lcasefn.endsWith(ext)) {
                return true;
            }
        }
        return false;
    }
1034691
private boolean caseMapCheck(File f, RelativePath name) {
        if (fileSystemIsCaseSensitive) return true;
        // Note that getCanonicalPath() returns the case-sensitive
        // spelled file name.
        String path;
        try {
            path = f.getCanonicalPath();
        } catch (IOException ex) {
            return false;
        }
        char[] pcs = path.toCharArray();
        char[] ncs = name.path.toCharArray();
        int i = pcs.length - 1;
        int j = ncs.length - 1;
        while (i >= 0 && j >= 0) {
            while (i >= 0 && pcs[i] == File.separatorChar) i--;
            while (j >= 0 && ncs[j] == '/') j--;
            if (i >= 0 && j >= 0) {
                if (pcs[i] != ncs[j]) return false;
                i--;
                j--;
            }
        }
        return j < 0;
    }
206728
private boolean isFakePath(String resourcename) {

        for (String folder : FOLDERS) {
            if (matchPath(folder, resourcename) || matchParentPath(folder, resourcename)) {
                return true;
            }
        }
        return false;
    }
979634
public static boolean isGrailsResource(Resource r) {
        try {
            String file = r.getURL().getFile();
            return isGrailsPath(file) || file.endsWith("GrailsPlugin.groovy");
        }
        catch (IOException e) {
            return false;
        }
    }
1232942
public static boolean isHtmlFileExtension(String extension) {
		for (final String ext : HTML_FILE_EXTENSIONS) {
			if (Strings.equal(ext, extension)) {
				return true;
			}
		}
		return false;
	}
440887
@Override
    public boolean matches(Source src) {
        String name = src.getOrigin().getName().toLowerCase();
        String[] extensions = getInputFileExtensions();
        if (extensions.length == 1) {
            return FilenameUtils.isExtension(name, extensions[0]);
        }

        return FilenameUtils.isExtension(name, extensions);
    }
380257
public static boolean isImage(File file)
  {
    return file != null ? IMAGE_FILE_EXTENSIONS.contains(Files.getExtension(file)) : false;
  }
397254
public static boolean isProjectSource(Resource r) {
        try {
            String file = r.getURL().getFile();
            return isProjectSource(file) || file.endsWith("GrailsPlugin.groovy");
        }
        catch (IOException e) {
            return false;
        }
    }
311781
public static boolean isFile(Node node)
   {
      try
      {
         if (!node.isNodeType("nt:file"))
            return false;
         if (!node.getNode("jcr:content").isNodeType("nt:resource"))
            return false;
         return true;
      }
      catch (RepositoryException exc)
      {
         LOG.error(exc.getMessage(), exc);
         return false;
      }
   }
963889
private boolean isStaticResource(String uri) {
        // find extension
        int index = uri.lastIndexOf('.');
        if(index == -1) {
            return false; // no extension found
        }

        String currentExtension = uri.substring(index);
        
        return STATIC_RESOURCE_EXTENSIONS.contains(currentExtension);
    }
831422
@Deprecated
    public static boolean isHTMLFile(final String lcasefn) {
        for (final String ext: supportedHTMLExtensions) {
            if (lcasefn.endsWith(ext)) {
                return true;
            }
        }
        return false;
    }
482337
@Override
    public boolean isFileExtensionRegistered(String fileTypeExtension) throws OSException {
        try {
            getFileExtension(fileTypeExtension);
            return true;
        } catch (OSException e) {
            return false;
        }
    }
17703
private boolean isMatchingFileExtension() {
    String[] fileExtensions = mediaArgs.getFileExtensions();
    if (fileExtensions == null || fileExtensions.length == 0) {
      return true;
    }
    for (String fileExtension : fileExtensions) {
      if (StringUtils.equalsIgnoreCase(fileExtension, getFileExtension())) {
        return true;
      }
    }
    return false;
  }
1161889
private static void checkResource(final List<String> resources, final Pattern searchPattern, final String resourceName) {
        if (searchPattern.matcher(resourceName).matches()) {
            resources.add(resourceName);
        }
    }
959689
public boolean isValidSourceFileOrDir(File file) {
        String name = file.getName();
        return !isExcludedDotFile(name) && !excludeExtensions.contains(Files.getExtension(file.getName()));
    }
1348112
private boolean isValidFile(String s, Set<JavaFileObject.Kind> fileKinds) {
        JavaFileObject.Kind kind = getKind(s);
        return fileKinds.contains(kind);
    }
804197
public boolean isFile(Path f) throws IOException {
    try {
      return !getFileStatus(f).isDir();
    } catch (FileNotFoundException e) {
      return false;               // f does not exist
    }
  }