Commit | Line | Data |
---|---|---|
629a09ae DV |
1 | /** |
2 | * @namespace | |
3 | * @deprecated Use {@link FilePath} instead. | |
4 | */ | |
5 | JSDOC.Util = { | |
6 | } | |
7 | ||
8 | /** | |
9 | * @deprecated Use {@link FilePath.fileName} instead. | |
10 | */ | |
11 | JSDOC.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 | */ | |
20 | JSDOC.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 | */ | |
28 | JSDOC.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 | } |