basename(path, ext = "") {
		ext = ext || "";
		if (path === "" || path === "/") return path;
		const ar = path.split("/");
		const last = ar.slice(-1)[0];
		if (!last) return ar.slice(-2)[0];
		let res = decodeURI(last.split("?")[0] || "");
		if (this.extname(res) === ext) res = res.replace(new RegExp(ext + "$"), "");
		return res;
	}
The path.basename() methods returns the last portion of a path,
similar to the Unix basename command.
Trailing directory separators are ignored, see path.sep.
@param {string} path
@returns {string}