Lines Matching refs:path
83 Regex used to break up a URL string around the URL's path.
87 1. Origin, everything before the URL's path-part.
88 2. The URL's path-part.
89 3. Suffix, everything after the URL's path-part.
164 Returns the current path root after popping off the last path segment,
167 The path root will always begin and end with a '/'.
170 @return {String} The URL's path root.
176 path = Y.getLocation().pathname,
179 if (path.charAt(path.length - 1) === slash) {
180 return path;
183 segments = path.split(slash);
257 Returns a normalized path, ridding it of any '..' segments and properly
261 @param {String} path URL path to normalize.
262 @return {String} Normalized path.
266 _normalizePath: function (path) {
271 if (!path || path === slash) {
275 segments = path.split(slash);
291 if (normalized !== slash && path.charAt(path.length - 1) === slash) {
318 Returns the normalized result of resolving the `path` against the current
319 path. Falsy values for `path` will return just the current path.
322 @param {String} path URL path to resolve.
323 @return {String} Resolved path.
327 _resolvePath: function (path) {
328 if (!path) {
334 if (path.charAt(0) === '/') {
335 return this._normalizePath(path);
338 return this._normalizePath(this._getRoot() + path);
348 URL's origin and are resolved and normalized against the current path root.
358 origin, path, query, hash, resolved;
365 path = parts[2];
376 return origin + (path || '/') + (query || '') + (hash || '');
379 // Will default to the current origin and current path.
380 resolved = this._getOrigin() + this._resolvePath(path);
382 // A path or query for the specified URL trumps the current URL's.
383 if (path || query) {