dirname(url) {
		if (typeof url !== "string") throw new Error("URL must be string");

		const urlObj = this.parse(url);
		url = urlObj.url;
		const protocol = this.getProtocol(url);

		if (protocol === "content:") {
			try {
				let { rootUri, docId, isFileUri } = Uri.parse(url);

				if (isFileUri) return this.dirname(rootUri);
				else {
					if (docId.endsWith("/")) docId = docId.slice(0, -1);
					docId = [...docId.split("/").slice(0, -1), ""].join("/");
					return Uri.format(rootUri, docId);
				}
			} catch (error) {
				return null;
			}
		} else {
			if (url.endsWith("/")) url = url.slice(0, -1);
			return [...url.split("/").slice(0, -1), ""].join("/") + urlObj.query;
		}
	}
Returns dirname from url eg. 'ftp://localhost/foo/'  from 'ftp://localhost/foo/bar'
@param {string} url
@returns {string}