Libraryless. Click here for Pure Java version (2123L/13K).
sS pathRelativeTo(File f, File dir) { if (dir == null || f == null) null; new LS out; do { out.add(fileName(f)); f = dirOfFile(f); if (eq(f, dir)) ret joinWithSlash(reversed(out)); } while (f != null); null; }
Began life as a copy of #1022904
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025262 |
| Snippet name: | pathRelativeTo (or null) - uses slashes |
| Eternal ID of this version: | #1025262/4 |
| Text MD5: | cdd81099b4695c39438eff1b5c94b4ba |
| Transpilation MD5: | a78fd87244fab7c7777b7ef63b255c31 |
| Author: | stefan |
| Category: | javax / io |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-09-17 00:09:19 |
| Source code size: | 240 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 450 / 586 |
| Version history: | 3 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1025263 - pathRelativeToUserDir (or null) - uses slashes |