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

11
LINES

< > BotCompany Repo | #1004519 // f2s - same as File.getAbsolutePath(); returns null on null

JavaX fragment (include)

static S f2s(File f) {
  ret f == null ? null : f.getAbsolutePath();
}

sS f2s(S s) { ret f2s(newFile(s)); }

ifndef Android
 static S f2s(java.nio.file.Path p) {
  ret p == null ? null : f2s(p.toFile());
}
endifndef

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1004519
Snippet name: f2s - same as File.getAbsolutePath(); returns null on null
Eternal ID of this version: #1004519/7
Text MD5: 62767c9e580c67a57060b0970d57e487
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-31 15:18:00
Source code size: 226 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 753 / 842
Version history: 6 change(s)
Referenced in: [show references]