Returns an absolute path to an entry by the specified name
@param {string=} [name] - entry name (if empty, returns path to the entries folder)
776677
function entry(name = '') {
	return path.normalize(path.join(sourceDir, config.entriesDir, name ? `${name}.js` : ''));
}
1008216
def path_entry(self, path):
        
        if path[0] != '/':
            return None
        path_parts = path.split('/')
        # Note that here the first element will be '' because it's before the
        # first separator.  That's OK, the join puts it back together.
        directory = '/'.join(path_parts[:-1])
        name = path_parts[-1]
        if directory not in self.listings:
            return None
        if name not in self.listings[directory]['entries']:
            return None
        return self.listings[directory]['entries'][name]
276278
function (name) {
  var n = path.extname(name).length;
  return n === 0 ? name : name.slice(0, -n);
}
1183897
function(name, root) {
    this.name = name || null;
    if (root) {
        this.root = new DirectoryEntry(root.name, root.fullPath, this);
    }
}
760567
def _relpath(name):
    
    return os.path.normpath(os.path.splitdrive(name)[1]).lstrip(_allsep)
184637
function getEntryImports(dir, content, arr = []) {
	$C(content.split(eol)).forEach((line) => {
		if (!hasImport.test(line)) {
			return;
		}

		const
			url = RegExp.$2,
			nodeModule = isNodeModule(url);

		if (nodeModule && entriesDir.test(url) || insideEntry.test(url)) {
			const
				d = nodeModule ? lib : dir;

			let
				f = path.join(d, `${url}.js`);

			if (!fs.existsSync(f)) {
				f = path.join(d, url, 'index.js');
			}

			getEntryImports(path.dirname(f), fs.readFileSync(f, 'utf-8'), arr);

		} else {
			arr.push(nodeModule ? url : path.join(dir, url));
		}
	});

	return arr;
}
1372502
def route_for(name)
      name = name.to_s
      @routes.select { |entry| entry.name == name }.first
    end
1155953
function getAbsPath(...relativePathPartsToRoot) {
    const { resolve, join } = path;

    return fs.existsSync(relativePathPartsToRoot[0])
      ? resolve(join(...relativePathPartsToRoot))
      : resolve(join(getRepoRootAbsPath(), ...relativePathPartsToRoot));
  }
572357
def convert_entry_to_path(path):
    # type: (Dict[S, Union[S, bool, Tuple[S], List[S]]]) -> S
    """"""

    if not isinstance(path, Mapping):
        raise TypeError("expecting a mapping, received {0!r}".format(path))

    if not any(key in path for key in ["file", "path"]):
        raise ValueError("missing path-like entry in supplied mapping {0!r}".format(path))

    if "file" in path:
        path = vistir.path.url_to_path(path["file"])

    elif "path" in path:
        path = path["path"]
    return path
784850
function getEntries(dirName) {
  const entries = {};
  getExamples(dirName, (entryName, filename) => {
    entries[entryName] = filename;
  });
  return entries;
}
363128
private String toPath(String name, IconSize size) {

        return CmsStringUtil.joinPaths(CmsWorkplace.getSkinUri(), ICON_FOLDER, "" + name.hashCode()) + size.getSuffix();
    }
1058187
def get_file(self, attr_name):
        ''''''
        return os.path.abspath(os.path.join(self.folder, "{}.log"
                                            .format(attr_name)))
890021
def find_in_path(name, path):
    ""
    # adapted fom http://code.activestate.com/recipes/52224-find-a-file-given-a-search-path/
    for dir in path.split(os.pathsep):
        binpath = os.path.join(dir, name)
        if os.path.exists(binpath):
            return os.path.abspath(binpath)
    return None
835706
def get_fullpath(self, fullname=None, relative_to=None):
        
        # if is an empty path
        if not fullname:
            return fullname

        isabs = os.path.isabs(fullname)

        path, name = os.path.split(fullname)

        if not name:  # path to a folder
            return None
        else:  # path to a file
            if isabs:
                return fullname
            else:
                return os.path.join(self.case_path, path, name)
12064
protected function getEntryPath(array $entry)
    {
        $path = '';

        foreach ($entry['path_collection']['entries'] as $folder) {
            if ($folder['id'] == self::ROOT_DIR_ID) {
                continue;
            }

            $path .= $folder['name'] . '/';
        }

        $path .= $entry['name'];

        return $path;
    }
43455
function(filename){
    // resolve by symlink if possible
    for (var from in this.symlinks)
      if (filename.indexOf(from) === 0 && (filename === from || filename[from.length] === '/'))
        return this.symlinks[from] + filename.substr(from.length);

    return path.resolve(this.fsBaseURI, filename.replace(/^[\\\/]/, ''));
  }
1130177
def path_for_import(name):
    
    return os.path.dirname(os.path.abspath(import_module(name).__file__))