%PDF- %PDF-
Direktori : /proc/985914/root/data/old/home/stash/atlassian-stash/static/model/ |
Current File : //proc/985914/root/data/old/home/stash/atlassian-stash/static/model/path-min.js |
define("model/path",function(){function A(B){var C=[];if(B instanceof Array){C=B}else{if(B){if(B.split){C=B.length?B.split(this._separator):[];if(C.length){if(!C[C.length-1]){C.pop()}if(!C[0]){C.shift()}}}else{if(B._components){C=B._components}else{if(B.components){C=B.components}}}}}this._components=C}A.prototype._separator="/";A.fromParentAndName=function(B,C){var D=B._components.slice(0);D.push(C);return new A(D)};A.prototype.getComponents=function(){return this._components.slice(0)};A.prototype.getExtension=function(){var B=this.getName()||"";var C=B.lastIndexOf(".");return C>0?B.substring(C+1):""};A.prototype.getName=function(){return this._components.length?this._components[this._components.length-1]:null};A.prototype.getParent=function(){return this._components.length?new A(this._components.slice(0,this._components.length-1)):null};A.prototype.isSameDirectory=function(C){if(this._components.length!==C._components.length){return false}var B=this._components.length-2;while(B>=0&&this._components[B]===C._components[B]){B--}return B<0};A.prototype.toString=function(){return this._components.join(this._separator)};return A});