congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
CndFileUtils.isSystemCaseSensitive
Code IndexAdd Tabnine to your IDE (free)

How to use
isSystemCaseSensitive
method
in
org.netbeans.modules.cnd.utils.cache.CndFileUtils

Best Java code snippets using org.netbeans.modules.cnd.utils.cache.CndFileUtils.isSystemCaseSensitive (Showing top 5 results out of 315)

origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

public static Set<String> createExtensionSet() {
  if (CndFileUtils.isSystemCaseSensitive()) {
    return new TreeSet<>();
  } else {
    return new TreeSet<>(String.CASE_INSENSITIVE_ORDER);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

  protected boolean areFilenamesEqual(String firstFile, String secondFile) {
    return CndFileUtils.isSystemCaseSensitive() ? firstFile.equals(secondFile) : firstFile.equalsIgnoreCase(secondFile);
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

public static boolean areFilenamesEqual(String firstFile, String secondFile) {
  return isSystemCaseSensitive() ? firstFile.equals(secondFile) : firstFile.equalsIgnoreCase(secondFile);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

private static String changeStringCaseIfNeeded(FileSystem fs, String path) {
  if (isLocalFileSystem(fs)) {
    if (CndFileUtils.isSystemCaseSensitive()) {
      return path;
    } else {
      return path.toLowerCase();
    }
  } else {
    return path; // remote is always case sensitive
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

/**
 * normalize LOCAL absolute paths
 * @param path
 * @return
 */
public static String normalizeAbsolutePath(String path) {
  CndUtils.assertAbsolutePathInConsole(path, "path for normalization must be absolute"); //NOI18N
  // TODO: this should be probably rewritten in a more elegant way
  if (path.startsWith("/") && Utilities.isWindows()) { // NOI18N
    return PathUtilities.normalizeUnixPath(path);
  }
  boolean caseSensitive = isSystemCaseSensitive();
  if (!caseSensitive) {
    if (Utilities.isWindows()) {
      path = path.replace('\\', '/');
    }
  }
  String normalized;
  // small optimization for true case sensitive OSs
  if (!caseSensitive || (path.endsWith("/.") || path.endsWith("\\.") || path.contains("..") || path.contains("./") || path.contains(".\\"))) { // NOI18N
    normalized = FileUtil.normalizeFile(new File(path)).getAbsolutePath();
  } else {
    normalized = path;
  }        
  return normalized;
}
org.netbeans.modules.cnd.utils.cacheCndFileUtilsisSystemCaseSensitive

Popular methods of CndFileUtils

  • isLocalFileSystem
  • normalizeAbsolutePath
  • toFileObject
  • getLocalFileSystem
  • createLocalFile
  • normalizeFile
    normalize file
  • fileObjectToUrl
  • getFileSeparatorChar
  • isExistingFile
    Tests whether the file exists and not directory. One of file or filePath must be not null
  • normalizePath
  • urlToFileObject
  • areFilenamesEqual
  • urlToFileObject,
  • areFilenamesEqual,
  • getCanonicalFileObject,
  • getCanonicalPath,
  • isExistingDirectory,
  • toFSPathList,
  • toFile,
  • changeStringCaseIfNeeded,
  • clearFileExistenceCache

Popular in Java

  • Start an intent from android
  • getApplicationContext (Context)
  • compareTo (BigDecimal)
  • setScale (BigDecimal)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • JCheckBox (javax.swing)
  • JFileChooser (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now