thirdparty/jsdoctoolkit/app/lib/JSDOC/Util.js
author Mario Ferraro <fadinlight@gmail.com>
Sun, 15 Nov 2009 22:12:20 +0100
changeset 3093 d1be59b6b627
parent 3041 c8f47f0b6697
permissions -rw-r--r--
GMaps related JS changed to use new google namespace. Google is going to change permanently in the future the way to load its services, so better stay safe. Also this commit shows uses of the new melange.js module. Fixes Issue 634.

/**
 * @namespace
 * @deprecated Use {@link FilePath} instead.
 */
JSDOC.Util = {
}

/**
 * @deprecated Use {@link FilePath.fileName} instead.
 */
JSDOC.Util.fileName = function(path) {
	LOG.warn("JSDOC.Util.fileName is deprecated. Use FilePath.fileName instead.");
	var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0);
	return path.substring(nameStart);
}

/**
 * @deprecated Use {@link FilePath.fileExtension} instead.
 */
JSDOC.Util.fileExtension = function(filename) {
	LOG.warn("JSDOC.Util.fileExtension is deprecated. Use FilePath.fileExtension instead.");
	return filename.split(".").pop().toLowerCase();
};

/**
 * @deprecated Use {@link FilePath.dir} instead.
 */
JSDOC.Util.dir = function(path) {
	LOG.warn("JSDOC.Util.dir is deprecated. Use FilePath.dir instead.");
	var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0);
	return path.substring(0, nameStart-1);
}