Check if the passed file is already compressed. The check is only done
using the file extension of the file name.

@param sFilename
The filename to be checked.
@return <code>true</code> if the file is already compressed.
323008
private static boolean _isAlreadyCompressed (final String sFilename)
  {
    for (final String sExt : EXTENSIONS_JS_COMPRESSED)
      if (sFilename.endsWith (sExt))
        return true;
    return false;
  }
539396
private boolean isSessionFilename(String filename) {
        if (!StringUtils.hasText(filename)) {
            return false;
        }
        String[] parts = filename.split("_");
        // Need at least 2 parts for a valid filename
        return (parts.length >= 2);
    }
1006203
public static function isVcsFile($fileName)
    {
        foreach (self::$vcsPatterns as $pattern) {
            if (strpos($fileName, $pattern) !== false) {
                return true;
            }
        }
        return false;
    }
1337742
public static boolean isFileInZip(String name) {
		if (name == null) {
			return false;
		}

		for (String element : ZIP_EXTENSIONS) {
			if (name.toLowerCase().contains(element + ZIP_DELIMITER)) {
				return true;
			}
		}
		return false;
	}
1040521
public static boolean isZip(String fileName) {
		if (fileName == null) {
			return false;
		}

		String tl = fileName.toLowerCase();
		for (String element : ZIP_EXTENSIONS) {
			if (tl.endsWith(element)) {
				return true;
			}
		}
		return false;
	}
866082
function isFileExtension(filepath, extension) {
			return typeof filepath === 'string' && path.extname(filepath) === extension && fs.existsSync(filepath) &&
				fs.lstatSync(filepath).isFile()
				;
		}
869157
public function containsFile( $fileName )
	{
		if( !$this->numFiles )
			return FALSE;
		foreach( $this->files as $key => $information )
			if( $information['name'] == $fileName )
				return TRUE;
	}
560968
public static boolean containsInvalid(String fileName) {
		return StrUtil.isBlank(fileName) ? false : ReUtil.contains(FILE_NAME_INVALID_PATTERN_WIN, fileName);
	}
1234135
private boolean matchesIncludes( final String fileName )
    {
        if( m_includes.length == 0 )
        {
            return true;
        }
        for( Pattern include : m_includes )
        {
            if( include.matcher( fileName ).matches() )
            {
                return true;
            }
        }
        return false;
    }
848413
public boolean isValidPosixFileName(String name) {
    for (int i = 0; i < name.length(); i++) {
      char c = name.charAt(i);
      if (i == 0) {
        if (c == '-') {
          return false;
        }
      }
      if (!isValidPosixFileChar(c)) {
        return false;
      }
    }
    return true;
  }
852839
public static String getSafeExtension(final String filename) {
        // extension does not include period (.)
        final String extension = FilenameUtils.getExtension(filename);
        return isSafeExtension(extension) ? "." + extension : StringUtils.EMPTY;
    }
579930
public static boolean hasExtension(File file, String... extensions) {
        String extension = FilenameUtils.getExtension(file.getName());
        for (String s : extensions) {
            if (extension.equalsIgnoreCase(s) || ("." + extension).equalsIgnoreCase(s)) {
                return true;
            }
        }
        return false;
    }
1257159
protected boolean fileExistsAndIsReadable(String filename) {

    File f = new File(filename);
    return f.exists() && f.isFile() && f.canRead();
  }
519920
public static function isJpegFile($filename)
    {
        try {
            $image = new ImageFile($filename);
            if (strtolower($image->getMime()) !== @image_type_to_mime_type(IMAGETYPE_JPEG)) {
                return false;
            }

            return true;
        } catch (\RuntimeException $ex) {
            return false;
        }
    }
1312905
public boolean add(String fileName) {
      writeLock.lock();
      try {
         return filenames.add(fileName);
      } finally {
         writeLock.unlock();
      }
   }
1348112
private boolean isValidFile(String s, Set<JavaFileObject.Kind> fileKinds) {
        JavaFileObject.Kind kind = getKind(s);
        return fileKinds.contains(kind);
    }
330302
public static boolean isValidFileName (String name) {
		try {
			if (OsUtils.isWindows()) {
				if (name.contains(">") || name.contains("<")) return false;
				name = name.toLowerCase(); //Windows is case insensitive
			}
			return new File(name).getCanonicalFile().getName().equals(name);
		} catch (Exception e) {
			return false;
		}
	}