Returns the index of the file matching fullPath in the working set.
@deprecated Use MainViewManager.findInWorkingSet() instead
@param {!string} fullPath
@return {number} index, -1 if not found
487623
function findInWorkingSet(fullPath) {
        DeprecationWarning.deprecationWarning("Use MainViewManager.findInWorkingSet() instead of DocumentManager.findInWorkingSet()", true);
        return MainViewManager.findInWorkingSet(MainViewManager.ACTIVE_PANE, fullPath);
    }
41302
int indexOf(ResourcePath key) {
    QueryDocumentSnapshot document = keyIndex.get(key);
    if (document == null) {
      return -1;
    }
    return sortedSet.indexOf(document);
  }
773437
public static File touch(String fullFilePath) throws IORuntimeException {
		if (fullFilePath == null) {
			return null;
		}
		return touch(file(fullFilePath));
	}
190905
public static String getFileName(String fullPath) {
        Preconditions.checkNotNull(fullPath, "path can not be null");
        int winDelimiterPos = fullPath.lastIndexOf(WINDOWS_DELIMITER);
        int linDelimiterPos = fullPath.lastIndexOf(LINUX_DELIMITER);
        int pos = Math.max(winDelimiterPos, linDelimiterPos);
        return fullPath.substring(pos + 1, fullPath.length());
    }
1060866
function (filepath) {

            // console.log('processing: ' + filepath);

            // read file source, saved in RAM
            var content = grunt.file.read(filepath);

            /*
             * Reset pattern's last search index to 0
             * at the beginning for each file content.
             *
             * NOTE:
             *   Since the pattern is always the same regex instance,
             *   property 'lastIndex' changes each time when .exec() is performed.
             *   To avoid 'lastIndex' affected by recursive function call,
             *   its value MUST be cached for each file content.
             */
            var cacheLastIndex = 0;
            _.pattern.lastIndex = cacheLastIndex;
            var matches = _.pattern.exec(content);
            cacheLastIndex = _.pattern.lastIndex;

            // While there are matches (of import-links) in file content
            while (matches !== null) {

                /*
                 * Construct the imported file's absolute path
                 *   (doesn't matter whether or not a relative path),
                 * and recursively search in imported file. (dept-first)
                 *
                 * NOTE:
                 *    - the regex uses capture group, the first match is the fragment file path.
                 */
                var currentDir = path.dirname(filepath),
                    relativeFilepath = matches[1].trim(),
                    importedFilepath = path.resolve(currentDir, relativeFilepath);

                var returnContent = getReplacedFileContent(importedFilepath);


                /*
                 * For current file content,
                 * replace import-link tag with return value.
                 *
                 * NOTE:
                 *   Because of dept-first search,
                 *   should ONLY replace the first match in current content.
                 *   rather than search globally.
                 */
                content = content.replace(_.patternNonGlobal, returnContent);
                // console.log(content);
                // console.log(matches);
                // console.log('-----');


                /*
                 * Keep searching in current file.
                 *
                 * NOTE:
                 *   After replacing part of the content (the step above),
                 *   the content's length changes accordingly.
                 *   Thus the 'lastIndex' property should shift to
                 *   the proper position to ensure next search.
                 */
                var deltaLength = returnContent.length - matches[0].length;

                _.pattern.lastIndex = cacheLastIndex + deltaLength;
                matches = _.pattern.exec(content);
                cacheLastIndex = _.pattern.lastIndex;
            }

            // When searching and replacing is done, return the result.
            return content;
        }
1290555
function findImports(filePath, result) {
  var importPaths = getImportPaths(filePath);
  var importPathsAbs = resolveImportPaths(filePath, importPaths);
  if( importPathsAbs.length )
    result.full[filePath] = importPathsAbs;
  importPathsAbs.forEach(function(path){
    if (result.simple.indexOf(path) === -1) {
      result.simple.push(path);
      findImports(path, result);
    }
  });
  return result;
}
245142
protected String checkWorkingFolderInPath( String filePath ) {
        if (filePath.contains(HMConstants.WORKINGFOLDER)) {
            return null;
        }
        return filePath;
    }
399648
function(filePath, currentPath){
	if(/^(?:\/|[a-zA-Z]:(?:\/|\\))/.test(filePath)){ // Is the path absolute?
		filePath = path.normalize(filePath);
	}else{ // Relative paths need to be resolved first
		filePath = path.resolve(currentPath, filePath);
	}
	return filePath;
}
792421
function createIndex(dirPath) {
    const dirName = path.basename(dirPath)
    return format(`/** DON'T EDIT THIS FILE; was created by scripts. */
    "use strict"

    module.exports = {
        ${fs
            .readdirSync(dirPath)
            .map(file => path.basename(file, ".js"))
            .map(id => `"${id}": require("./${dirName}/${id}"),`)
            .join("\n    ")}
    }
    `)
}
542463
public long index() {
    return Long.valueOf(file.getName().substring(file.getName().lastIndexOf(PART_SEPARATOR, file.getName().lastIndexOf(PART_SEPARATOR) - 1) + 1, file.getName().lastIndexOf(PART_SEPARATOR)));
  }
1014530
function findResource(name, filepath, extList) {
  var candidates = [name, path.join(name, 'index')];
  var baseName = path.basename(name);
  if (baseName && baseName !== '.' && baseName !== '..') {
    candidates.push(path.join(name, baseName));
  }
  var info = null;

  candidates.every(function(candidate) {
    info = fis.uri(candidate, filepath);

    for (var i = 0, len = extList.length; i < len && !info.file; i++) {
      info = fis.uri(candidate + extList[i], filepath);
    }

    if (info && info.file) {
      return false;
    }

    return true;
  });

  return info;
}
496765
function getWorkingPath(file) {

      var completePath = JSON.stringify(file).slice(2,-2).split('/'),
        lastPathElement = completePath.pop(),
        fileDirectory = completePath.splice(lastPathElement).join('/');

        return fileDirectory;
    }
319157
def full_path(self):
        ''''''
        with self._mutex:
            if self._parent:
                return self._parent.full_path + [self._name]
            else:
                return [self._name]
127554
function _getLongestMatchingPath(containing) {
            if (angular.isUndefined(lxSelect.matchingPaths) || lxSelect.matchingPaths.length === 0) {
                return undefined;
            }

            containing = containing || lxSelect.matchingPaths[0];

            var longest = lxSelect.matchingPaths[0];
            var longestSize = longest.split('.').length;
            for (var i = 1, len = lxSelect.matchingPaths.length; i < len; i++) {
                var matchingPath = lxSelect.matchingPaths[i];
                if (!matchingPath) {
                    continue;
                }

                if (matchingPath.indexOf(containing) === -1) {
                    break;
                }

                var size = matchingPath.split('.').length;
                if (size > longestSize) {
                    longest = matchingPath;
                    longestSize = size;
                }
            }

            return longest;
        }
1222831
function findView(req) {
  var viewpath = normalizeRequestPath(req.path, 'index');
  // This pattern finds all possible view files.
  var pattern = viewpath + '{/index.,.}+(jade|htm)';
  // #region How it works
  // See https://github.com/isaacs/node-glob#glob-primer
  // (For the following examples to work, the files must exist.)
  //
  // Given a sourceDir of '/x/y/z' and a viewpath of 'hello':
  // > glob.sync('hello{/index.,.}+(jade|htm)', {cwd: sourceDir, nodir: true});
  // ['hello.jade', 'hello/index.jade']
  // 
  // If the viewpath equals the word 'index':
  // > glob.sync('index{/index.,.}+(jade|htm)', {cwd: sourceDir, nodir: true});
  // ['index.htm', 'index.jade']
  // 
  // If the viewpath is a directory like 'hello/goodbye':
  // > glob.sync('hello/goodbye{/index.,.}+(jade|htm)', 
  //     { cwd: sourceDir, nodir: true});
  // ['hello/goodbye.jade', 'hello/goodbye/index.jade']
  // #endregion
  verbose('Finding views in: ', build.sourceDir, ' with pattern: ', pattern);
  var files = glob.sync(pattern, {
    cwd: build.sourceDir,
    nodir: true
  });
  if (files.length === 0)
    return false;
  req.viewpath = path.join(build.sourceDir, files[0]);
  console.log('GET ' + req.path + ' -> ' + req.viewpath);
  return true;
}
549298
function getRealLocation(filepath) {
    	var segs = filepath.split(path.sep);
		var fileRoot = getfileRoot(segs[1]);
		var realPath = path.join("/", fileRoot, segs[2]);
		return realPath;
    }
495510
function fullPath(file, base) {
  if (!path.extname(file)) file += '.js'
  base = base ? path.dirname(base) : process.cwd()
  return path.resolve(base, file)
}