Merges two paths. @param path path to be merged @return resulting reference
(final String path)
| 247 | * @return resulting reference |
| 248 | */ |
| 249 | public final IO merge(final String path) { |
| 250 | if(path.isEmpty()) return this; |
| 251 | final IO io = get(path); |
| 252 | if(io.isAbsolute()) return io; |
| 253 | if(IOUrl.isJarURL(pth)) { |
| 254 | try { |
| 255 | return get(new URL(new URL(pth), path).toString()); |
| 256 | } catch(final MalformedURLException ex) { |
| 257 | Util.stack(ex); |
| 258 | } |
| 259 | } |
| 260 | return get((Strings.endsWith(pth, '/') ? pth : dir()) + path); |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * Checks if this file is an archive. |