class FileSystem {

	@Pure
	public static File removeExtension(File filename) {
		if (filename == null) {
			return null;
		}
		final File dir = filename.getParentFile();
		final String name = filename.getName();
		final int idx = name.lastIndexOf(getFileExtensionCharacter());
		if (idx < 0) {
			return filename;
		}
		return new File(dir, name.substring(0, idx));
	}

	private  FileSystem();

}