Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1023136 // disk_findMountPoint

JavaX fragment (include)

sS disk_findMountPoint(File f, LS mountPoints, O... _) {
  ret f == null ? null : disk_findMountPoint(f.getPath(), mountPoints, _);
}

sS disk_findMountPoint(S f, LS mountPoints, O... _) {
  if (f == null) null;
  S path = addFileSep(getCanonicalPath(f));
  if (boolPar debug(_)) print("Canonical: " + path);
  ret bestByScoreFunction(mountPoints, mp -> startsWith(path, addFileSep(mp)) ? l(mp) : null);
}

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: 296 / 338
Version history: 5 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)