Tabnine Logo
CndFileUtils.normalizeFile
Code IndexAdd Tabnine to your IDE (free)

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

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

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

public NativeFileItemImpl(File file, NativeProjectImpl project, NativeFileItem.Language language, NativeFileItem.LanguageFlavor flavor) {

  this.project = project;
  this.file = CndFileUtils.normalizeFile(file);
  this.lang = language;
  this.flavor = flavor;
}

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

public static void assertNormalized(File file) {
  if (isDebugMode()) {
    File normFile = CndFileUtils.normalizeFile(file);
    if (!file.equals(normFile)) {
      assertTrueInConsole(false, "Parameter file was not normalized. Was " + file + " instead of " + normFile); // NOI18N
    }
  }
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

/**
 * tries to detect mime type of file checking cnd known types first
 * @param file file to check
 * @return one of mime types or "content/unknown"
 */
public static String getSourceFileMIMEType(File file) {
  FileObject fo = CndFileUtils.toFileObject(CndFileUtils.normalizeFile(file));
  String mime;
  if (fo != null && fo.isValid()) {
    // try fast check
    mime = getSourceFileMIMEType(fo);
  } else {
    mime = getKnownSourceFileMIMETypeByExtension(file.getPath());
  }
  return mime != null ? mime : "content/unknown"; // NOI18N
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

/**
 * tries to detect mime type of file checking cnd known types first
 * @param file file to check
 * @return one of mime types or "content/unknown"
 */
public static String getBinaryFileMIMEType(File file) {
  FileObject fo = CndFileUtils.toFileObject(CndFileUtils.normalizeFile(file));
  String mime;
  if (fo != null && fo.isValid()) {
    // try fast check
    mime = getBinaryFileMIMEType(fo);
  } else {
    mime = getKnownBinaryFileMIMETypeByExtension(file.getPath());
  }
  return mime != null ? mime : "content/unknown"; // NOI18N
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-toolchain

FileObject fo = CndFileUtils.toFileObject(CndFileUtils.normalizeFile(file));
return fo;
origin: org.netbeans.api/org-netbeans-modules-cnd-gizmo

writer.flush();
writer.close();
fo = CndFileUtils.toFileObject(CndFileUtils.normalizeFile(tempFile));
org.netbeans.modules.cnd.utils.cacheCndFileUtilsnormalizeFile

Javadoc

normalize file

Popular methods of CndFileUtils

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

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • compareTo (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ImageIO (javax.imageio)
  • Option (scala)
  • Top plugins for Android Studio
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