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

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

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

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

public static String naturalizeSlashes(FileSystem fileSystem, String path) {
  char rightSlash = CndFileUtils.getFileSeparatorChar(fileSystem);
  char wrongSlash = (rightSlash == '/') ? '\\' : '/';
  return path.replace(wrongSlash, rightSlash);
}
origin: org.netbeans.modules/org-netbeans-modules-cnd-makeproject

private String resolvePath(String filename) throws IllegalArgumentException {
  if (filename == null) {
    throw new NullPointerException("null filename passed to resolveFile"); // NOI18N
  }
  String result;
  if (RELATIVE_SLASH_SEPARATED_PATH.matcher(filename).matches()) {
    result = dir.getPath() + CndFileUtils.getFileSeparatorChar(fileSystem) + filename;
  } else {
    result = filename;
  }
  return FileSystemProvider.normalizeAbsolutePath(result, fileSystem);
}

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

projectFolderField.setText(projectFolder + CndFileUtils.getFileSeparatorChar(fileSystem) + projectName);
if (!validateProjectLocation()) {
  return;
origin: org.netbeans.modules/org-netbeans-modules-cnd-utils

FileObject file = fs.findResource(path);            
if (file != null && file.isFolder() && file.canRead()) {
  final char fileSeparatorChar = getFileSeparatorChar(fs);            
  for (FileObject child : file.getChildren()) {
origin: org.netbeans.modules/org-netbeans-modules-cnd-apt

/** 
 * finds file relatively to the baseFile 
 * caller must check that resolved path is not the same as base file
 * to prevent recursive inclusions 
 */
public static ResolvedPath resolveFilePath(FileSystem fs, String inclString, CharSequence baseFile) {
  if (baseFile != null) {
    String folder = CndPathUtilities.getDirName(baseFile.toString());
    String absolutePath = folder + CndFileUtils.getFileSeparatorChar(fs) + inclString;
    if (isExistingFile(fs, absolutePath)) {
      absolutePath = normalize(fs, absolutePath);
      folder = normalize(fs, folder);
      return new ResolvedPath(fs, FilePathCache.getManager().getString(folder), absolutePath, true, 0);
    }
  }
  return null;
}

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

if (accessor.isExistingDirectory(dirPrefix)) {
  FileSystem fs = dirPrefix.getFileSystem();
  char fileSeparatorChar = CndFileUtils.getFileSeparatorChar(fs);
  String includedFile = anIncludedFile.replace('/', fileSeparatorChar);
  CharSequence prefix = dirPrefix.getAsSharedCharSequence();
org.netbeans.modules.cnd.utils.cacheCndFileUtilsgetFileSeparatorChar

Popular methods of CndFileUtils

  • isLocalFileSystem
  • normalizeAbsolutePath
  • toFileObject
  • getLocalFileSystem
  • createLocalFile
  • normalizeFile
    normalize file
  • fileObjectToUrl
  • 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

  • Parsing JSON documents to java classes using gson
  • getSharedPreferences (Context)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (Timer)
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Path (java.nio.file)
  • JButton (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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