Helper function to get the path to the file where a test was defined.
181826
function getCallerLocation() {
    const error = new Error();
    if (error.stack) {
        const lines = error.stack.split("\n");
        for (let i = 2; i < lines.length; i++) {
            if (i > 0 && lines[i] === "    at <anonymous>") {
                const paren = lines[i - 1].indexOf("(");
                if (paren >= 0) {
                    return lines[i - 1].slice(paren + 1, lines[i - 1].length - 1);
                }
                else {
                    return "";
                }
            }
            else if (!lines[i].startsWith("    at CanaryTest.") &&
                !lines[i].startsWith("    at new CanaryTest")) {
                const paren = lines[i].indexOf("(");
                if (paren >= 0) {
                    return lines[i].slice(paren + 1, lines[i].length - 1);
                }
                else {
                    return lines[i].slice(7, lines[i].length);
                }
            }
        }
    }
    return "";
}
406301
def _get_path():
    """"""
    if _path:
        return _path[0]
    environ_paths = set(os.environ['PATH'].split(':'))
    environ_paths.add('/usr/local/bin')
    environ_paths.add('/usr/bin')
    _path.append(':'.join(environ_paths))
    logger.debug('PATH = %s', _path[-1])
    return _path[0]
608779
def get_filepath(self, filename):
        
        return os.path.join(self.parent_folder, '{},{},{}'.format(self.tile_name, self.date, self.aws_index),
                            self.add_file_extension(filename)).replace(':', '.')
1155662
function getFilePath (cfg, req) {
	const urlParsed = req[cfg.parsedURLName] || url.parse(req.url);
	return path.join(cfg.documentRoot, (urlParsed.pathname || '/'));
}
1223312
def _locate_file(self, pattern, root=os.path.dirname('revokests_key.py')):
        

        for path, dirs, files in os.walk(os.path.abspath(root)):
            for filename in fnmatch.filter(files, pattern):
                return os.path.join(path, filename)
637618
def _get_path(self, file):
        """"""
        dir = self._cache_directory()
        if not os.path.exists(dir):
            os.makedirs(dir)
        return os.path.join(dir, file)
1102764
def _locate_file(f, base_dir):
    
    if base_dir == None:
        return f
    file_name = os.path.join(base_dir, f)
    real = os.path.realpath(file_name)
    #print_v('- Located %s at %s'%(f,real))
    return real
1084295
function(file) {
    var html   = filter.get('tag', fss.filetype(file))('test');
    var prefix = config.root ? config.root : '';
    var suffix = config.timestamp && html ? '?v=' + config.time : '';
    var encode = fss.relative(file).replace(/\s/g, '%20');
    return path.join(prefix, encode) + suffix;
}
573266
def _find_file(self, load):
        '''
        
        '''
        path = load.get('path')
        if not path:
            return {'path': '',
                    'rel': ''}
        tgt_env = load.get('saltenv', 'base')
        return self.find_file(path, tgt_env)
65321
def get_path(*args, module=a99):
    

    p = os.path.abspath(os.path.join(os.path.split(module.__file__)[0], *args))
    return p
968064
def GetParentFileEntry(self):
    
    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return None

    parent_location = self._file_system.DirnamePath(location)
    if parent_location is None:
      return None

    if parent_location == '':
      parent_location = self._file_system.PATH_SEPARATOR

    path_spec = fake_path_spec.FakePathSpec(location=parent_location)
    return self._file_system.GetFileEntryByPathSpec(path_spec)
194966
def GetFileEntryByPathSpec(self, path_spec):
    
    store_index = vshadow.VShadowPathSpecGetStoreIndex(path_spec)

    # The virtual root file has not corresponding store index but
    # should have a location.
    if store_index is None:
      location = getattr(path_spec, 'location', None)
      if location is None or location != self.LOCATION_ROOT:
        return None

      return vshadow_file_entry.VShadowFileEntry(
          self._resolver_context, self, path_spec, is_root=True,
          is_virtual=True)

    if store_index < 0 or store_index >= self._vshadow_volume.number_of_stores:
      return None

    return vshadow_file_entry.VShadowFileEntry(
        self._resolver_context, self, path_spec)
1108666
function findConfigFile(filePath) {
		let prev = null
		do {
			const testPath = path.join(filePath, 'tsconfig.json')
			if (fs.existsSync(testPath)) {
				return testPath
			}
			prev = filePath
			filePath = path.dirname(filePath)
		} while (prev !== filePath)
		return undefined
	}
142115
def getabsfile(object):
    """"""
    return os.path.normcase(
        os.path.abspath(getsourcefile(object) or getfile(object)))
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
154405
function getOutputFilePath(input, outputDir, suffix) {
  var inputArr = input.split(path.sep);
  var originFileName = inputArr[inputArr.length - 1];
  var newFileName = originFileName.replace(/\.png$/, suffix + '.png');
  var outputFilePath = path.join(outputDir, newFileName);
  return outputFilePath;
}
1030354
def find_file(path)
			caller_path = caller_locations(4..4).first.path

			caller_dir =
				begin
					File.dirname(caller_path).sub(views_dir, '') if Tilt[caller_path]
				rescue LoadError
					nil
				end

			find_files(path, controller_dirs | Array(caller_dir))
				.find { |file| Tilt[file] }
		end