Get the name of this file with its extension removed. Because of other uses of this method, this is not a good place to do things like swap underscores for spaces.
()
| 141 | * to do things like swap underscores for spaces. |
| 142 | */ |
| 143 | public String getPrettyName() { |
| 144 | String name = file.getName(); |
| 145 | |
| 146 | // remove the extension from the name |
| 147 | int dot = name.lastIndexOf('.'); |
| 148 | // should have a dot in all current scenarios, but better not to make |
| 149 | // that assumption in case we later decide to allow things like README |
| 150 | return (dot != -1) ? name.substring(0, dot) : name; |
| 151 | } |
| 152 | |
| 153 | |
| 154 | public String getExtension() { |