1 | sS disk_findMountPoint(File f, LS mountPoints, O... _) { |
2 | ret f == null ? null : disk_findMountPoint(f.getPath(), mountPoints, _); |
3 | } |
4 | |
5 | sS disk_findMountPoint(S f, LS mountPoints, O... _) { |
6 | if (f == null) null; |
7 | S path = addFileSep(getCanonicalPath(f)); |
8 | if (boolPar debug(_)) print("Canonical: " + path); |
9 | ret bestByScoreFunction(mountPoints, mp -> startsWith(path, addFileSep(mp)) ? l(mp) : null); |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023136 |
Snippet name: | disk_findMountPoint |
Eternal ID of this version: | #1023136/6 |
Text MD5: | 31d9398e498be83c39b174a758186f2f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-05-15 14:30:20 |
Source code size: | 414 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 295 / 338 |
Version history: | 5 change(s) |
Referenced in: | [show references] |