bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
function path2FolderName(filePath, keepTailSlash){
		var pathSegs = filePath.split("/");
		pathSegs.splice(pathSegs.length -1, 1);
		return keepTailSlash ? pathSegs.join("/") + "/" : pathSegs.join("/");
	}
function path2FolderName(filePath, keepTailSlash){
		var pathSegs = filePath.split("/");
		pathSegs.splice(pathSegs.length -1, 1);
		return keepTailSlash ? pathSegs.join("/") + "/" : pathSegs.join("/");
	}
function path2FolderName ( filePath , keepTailSlash ) { var pathSegs = filePath . split ( "/" ) ; pathSegs . splice ( pathSegs . length - 1 , 1 ) ; return keepTailSlash ? pathSegs . join ( "/" ) + "/" : pathSegs . join ( "/" ) ; }
Returns the folder name from path.
@param {String} filePath
@param {Boolean} keepTailSlash
@returns {String}
Returns the folder name from path .