Lines Matching refs:path
81 Regex used to break up a URL string around the URL's path.
85 1. Origin, everything before the URL's path-part.
86 2. The URL's path-part.
87 3. Suffix, everything after the URL's path-part.
162 Returns the current path root after popping off the last path segment,
165 The path root will always begin and end with a '/'.
168 @return {String} The URL's path root.
174 path = Y.getLocation().pathname,
177 if (path.charAt(path.length - 1) === slash) {
178 return path;
181 segments = path.split(slash);
255 Returns a normalized path, ridding it of any '..' segments and properly
259 @param {String} path URL path to normalize.
260 @return {String} Normalized path.
264 _normalizePath: function (path) {
269 if (!path || path === slash) {
273 segments = path.split(slash);
289 if (normalized !== slash && path.charAt(path.length - 1) === slash) {
316 Returns the normalized result of resolving the `path` against the current
317 path. Falsy values for `path` will return just the current path.
320 @param {String} path URL path to resolve.
321 @return {String} Resolved path.
325 _resolvePath: function (path) {
326 if (!path) {
332 if (path.charAt(0) === '/') {
333 return this._normalizePath(path);
336 return this._normalizePath(this._getRoot() + path);
346 URL's origin and are resolved and normalized against the current path root.
356 origin, path, query, hash, resolved;
363 path = parts[2];
374 return origin + (path || '/') + (query || '') + (hash || '');
377 // Will default to the current origin and current path.
378 resolved = this._getOrigin() + this._resolvePath(path);
380 // A path or query for the specified URL trumps the current URL's.
381 if (path || query) {