Returns the application directory. @param location location of application (can be null) @return application directory (can be null)
(final URL location)
| 133 | * @return application directory (can be {@code null}) |
| 134 | */ |
| 135 | private static String applicationDir(final URL location) { |
| 136 | try { |
| 137 | if(location != null && "file".equals(location.getProtocol())) { |
| 138 | return new IOFile(Paths.get(location.toURI()).toString()).dir(); |
| 139 | } |
| 140 | } catch(final Exception ex) { |
| 141 | Util.stack(ex); |
| 142 | } |
| 143 | return null; |
| 144 | } |
| 145 | |
| 146 | /** |
| 147 | * Attaches a directory separator to the specified directory string. |