PageRenderTime 57ms CodeModel.GetById 49ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.2.1/jsdoc-toolkit/app/lib/JSDOC/Util.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 32 lines | 24 code | 1 blank | 7 comment | 0 complexity | c63e79c291d904cbbe7fe152ff95db7c MD5 | raw file
 1/**
 2 * @namespace
 3 * @deprecated Use {@link FilePath} instead.
 4 */
 5JSDOC.Util = {
 6}
 7
 8/**
 9 * @deprecated Use {@link FilePath.fileName} instead.
10 */
11JSDOC.Util.fileName = function(path) {
12	LOG.warn("JSDOC.Util.fileName is deprecated. Use FilePath.fileName instead.");
13	var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0);
14	return path.substring(nameStart);
15}
16
17/**
18 * @deprecated Use {@link FilePath.fileExtension} instead.
19 */
20JSDOC.Util.fileExtension = function(filename) {
21	LOG.warn("JSDOC.Util.fileExtension is deprecated. Use FilePath.fileExtension instead.");
22	return filename.split(".").pop().toLowerCase();
23};
24
25/**
26 * @deprecated Use {@link FilePath.dir} instead.
27 */
28JSDOC.Util.dir = function(path) {
29	LOG.warn("JSDOC.Util.dir is deprecated. Use FilePath.dir instead.");
30	var nameStart = Math.max(path.lastIndexOf("/")+1, path.lastIndexOf("\\")+1, 0);
31	return path.substring(0, nameStart-1);
32}