This action is usually accessed with the root path, normally '/'
973658
def home
      if page.link_url.present? && page.link_url != "/"
        redirect_to page.link_url, status: 301 and return
      end
      render_with_templates?
    end
308071
def root_dir(relpath)
      r = relpath.match(%r(^[/]?.+?[/$]))
      return relpath if r.nil?
      r[0] || relpath
    end
314454
def path_with_slashes(path)
      path = '/' + path unless path.start_with?('/')
      path << '/' unless path.end_with?('/')
      path
    end
126851
def proper_path(path):
    
    if path.startswith("./"):
        pass
    elif path.startswith("/"):
        path = ".%s" % path
    elif path.startswith("."):
        while path.startswith("."):
            path = path[1:]
        if path.startswith("/"):
            path = ".%s" % path
    else:
        path = "./%s" % path

    if not path.endswith("/"):
        path += "/"

    return path
1009309
def url2tmp(self, root, url):
        
        filename = url.rsplit('/', 1)[-1]
        return os.path.join(root, filename)
961774
function () {
                var args = Array.prototype.slice.call(arguments);
                return Path.normalize(args.join('/'));
            }
27738
def _fixpath(root, base):
    """"""
    return os.path.abspath(os.path.normpath(os.path.join(root, base)))
69139
def auto_link_paths
      paths = (controller_name / action_name).split('/')
      first = paths.shift
      paths.inject( [first] ) do |memo, val|
        memo.push [memo.last, val].join('/')
      end
    end
1325477
function resolveInRoot(root) {
    var input, result, err;

    input = _.chain(arguments)
        .toArray()
        .slice(1)
        .reduce(function(current, p) {
            // Handle path relative to book root ("/README.md")
            if (p[0] == "/" || p[0] == "\\") return p.slice(1);

            return current? path.join(current, p) : path.normalize(p);
        }, "")
        .value();

    result = path.resolve(root, input);

    if (!isInRoot(root, result)) {
        err = new Error("EACCESS: \"" + result + "\" not in \"" + root + "\"");
        err.code = "EACCESS";
        throw err;
    }

    return result;
}
1262785
def get_root_path(self, path):
        """"""
        # Look at the directories present in the current working directory. In
        # case a .svn directory is present, we know we are in the root directory
        # of a Subversion repository (for Subversion 1.7.x). In case no
        # repository specific folder is found, and the current directory has a
        # parent directory, look if a repository specific directory can be found
        # in the parent directory.
        while path != '/':
            if '.svn' in os.listdir(path):
                return path
            path = os.path.abspath(os.path.join(path, os.pardir))

        # No Subversion repository found.
        return None
857084
def base_request_path(event)
      path_from_event(event).split('/').drop(1).select { |a| a.match(/\d+/).nil? }.join('_') if event
    end
189603
function( path ) {
		if ( rhome.exec( path ) ) {
			path = path.replace( rhome, process.env.HOME + '/' );
		}
		else if ( ! rroot.exec( path ) ) {
			path = process.cwd() + '/' + path;
		}

		return path;
	}
672356
def find_root_with_flag(flag, default=nil)
      root_path = self.called_from[0]

      while root_path && ::File.directory?(root_path) && !::File.exist?("#{root_path}/#{flag}")
        parent = ::File.dirname(root_path)
        root_path = parent != root_path && parent
      end

      root = ::File.exist?("#{root_path}/#{flag}") ? root_path : default
      raise "Could not find root path for #{self}" unless root

      RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ?
      Pathname.new(root).expand_path : Pathname.new(root).realpath
    end
398361
function BaseRouter( basePath , tree = {} ) {
	this.basePathParts = Array.isArray( basePath ) ? basePath : basePath.split( '/' ).filter( part => part ) ;
	this.tree = tree ;
}
278756
public function relative_file_root_path()
    {
        $subDirs = implode('/', $this->subDirs);
        if ($subDirs) {
            $subDirs .= '/';
        }
        return $subDirs . $this->fileRoot;
    }
306068
protected function ensureRootDirectory()
    {
        if ($this->dirExists === true) {
            return;
        }

        $this->ensureDirectory((string)$this->filePath('foo')->pop()); // trigger errors if unconfigured

        $this->dirExists = true;
    }
180925
def ensure_dir_path(self, path, relative=False):
        
        if not relative:
            rel_path = self.relpath(path)
        else:
            rel_path = path

        # Locator
        if self.is_locator(rel_path, relative=True):
            path = path.rstrip('/')

        # Directory
        elif rel_path:
            path = path.rstrip('/') + '/'
        # else: root
        return path