Returns path containing canonical symlinks (if any).
491877
function pathWithSymlinks(path) {
                    var withSymlinks = path;
                    for (var real in realToSym) {
                        if (withSymlinks.indexOf(real) === 0) {
                            var symlink = realToSym[real];
                            withSymlinks = withSymlinks.replace(real, symlink);
                        }
                    }
                    return withSymlinks;
                }
1133533
def _absolutePaths(self, paths):
		
		slashes = [p.replace('\\', '/') for p in paths]
		stripped = [p.replace('../', '') if p.startswith('../') else p for p in slashes]
		return list([p if (os.path.isabs(p) or '/' not in p) else os.path.join(self.engineRoot, self.engineSourceDir, p) for p in stripped])
967537
function getCanonicalPath(path) {
        path = path.replace(/\//g, '\\');
        path = path.replace(/\\\\/g, '\\');
        return path;
    }
1008602
function canonicalPath() {
  var canon = canonical();
  if (!canon) return window.location.pathname;
  var parsed = url.parse(canon);
  return parsed.pathname;
}
309977
def symlink_path(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Rock Ridge extension not yet initialized')

        if not self.is_symlink():
            raise pycdlibexception.PyCdlibInvalidInput('Entry is not a symlink!')

        outlist = []
        saved = b''
        for rec in self.dr_entries.sl_records + self.ce_entries.sl_records:
            if rec.last_component_continued():
                saved += rec.name()
            else:
                saved += rec.name()
                outlist.append(saved)
                saved = b''

        if saved != b'':
            raise pycdlibexception.PyCdlibInvalidISO('Saw a continued symlink record with no end; ISO is probably malformed')

        return b'/'.join(outlist)
63682
def symlink(self, source, target):
        ''

        return self.operations('symlink', target.decode(self.encoding),
                                          source.decode(self.encoding))
967878
def need_to_create_symlink(directory, checksums, filetype, symlink_path):
    """"""
    # If we don't have a symlink path, we don't need to create a symlink
    if symlink_path is None:
        return False

    pattern = NgdConfig.get_fileending(filetype)
    filename, _ = get_name_and_checksum(checksums, pattern)
    full_filename = os.path.join(directory, filename)
    symlink_name = os.path.join(symlink_path, filename)

    if os.path.islink(symlink_name):
        existing_link = os.readlink(symlink_name)
        if full_filename == existing_link:
            return False

    return True
1243760
def symlink_configs
      paths = Dir.glob("#{shared_path}/config/**/*").
                select {|p| File.file?(p) }
      paths.each do |src|
        relative_path = src.gsub(%r{.*config/},'config/')
        dest = "#{release_path}/#{relative_path}"
        # make sure the directory exist for symlink creation
        dirname = File.dirname(dest)
        FileUtils.mkdir_p(dirname) unless File.exist?(dirname)
        FileUtils.rm_rf(dest) if File.exist?(dest)
        FileUtils.ln_s(src,dest)
      end
    end
368193
def _build_paths():
    
    paths = sysconfig.get_paths()
    return {
        "prefix": sys.prefix,
        "data": paths["data"],
        "scripts": paths["scripts"],
        "headers": paths["include"],
        "purelib": paths["purelib"],
        "platlib": paths["platlib"],
    }
1303567
def canonical(self):
        """"""
        try:
            return tuple(map(lambda x: x.lower(), self.name()))
        except:
            return tuple([x.lower() for x in self.name()])
479378
def isdir(self, path, follow_symlinks=True):
        
        return self._is_of_type(path, S_IFDIR, follow_symlinks)
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]
541872
def linuxPaths(self):
        
        for ((dirTree, dirID, dirSeq), (dirPath, name)) in self.links.items():
            for path in self.fileSystem.volumes[dirTree].linuxPaths:
                yield path + "/" + dirPath + name
        if self.fullPath in self.fileSystem.mounts:
            yield self.fileSystem.mounts[self.fullPath]
251894
def _path(self, attrpath):
        """"""

        attr, _, subpath = attrpath.partition(".")
        if attr not in self.__dict__:
            self.__dict__[attr] = Namespace()
            self.__namespaces.add(attr)

        if subpath:
            return self.__dict__[attr]._path(subpath)
        else:
            return self.__dict__[attr]
1160693
def GetPythonLibraryDirectoryPath():
  """"""
  path = sysconfig.get_python_lib(True)
  _, _, path = path.rpartition(sysconfig.PREFIX)

  if path.startswith(os.sep):
    path = path[1:]

  return path
228416
public String canonicalOrAbsolutePath(String path) {

        try {
            return canonicalPath(path);
        } catch (Exception e) {
            return absolutePath(path);
        }
    }
191296
def find_matching_symlink(path, source):
    
    def to_abs(target):
        if os.path.isabs(target):
            return target
        else:
            return os.path.normpath(os.path.join(path, target))

    abs_source = to_abs(source)

    for name in os.listdir(path):
        linkpath = os.path.join(path, name)
        if os.path.islink:
            source_ = os.readlink(linkpath)
            if to_abs(source_) == abs_source:
                return name

    return None