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

13
LINES

< > BotCompany Repo | #1015311 // userDesktopDir

JavaX fragment (include)

static File userDesktopDir() {
  File f = toFileOpt(loadTextFile(userDesktopDirPointerFile()));
  if (f != null) ret f;
  final new Var<File> v;
  selectDir("Please select your desktop directory", userDir("Desktop"), voidfunc(File f) { v.set(f); });
  waitForVarToBeNotNull(v);
  saveTextFile(userDesktopDirPointerFile(), f2s(v!));
  ret v!;
}

static File userDesktopDir(S sub) {
  ret newFile(userDesktopDir(), sub);
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015311
Snippet name: userDesktopDir
Eternal ID of this version: #1015311/8
Text MD5: 3e1cc019488af00bb495b0bbb3931724
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-27 15:09:32
Source code size: 432 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 381 / 437
Version history: 7 change(s)
Referenced in: [show references]