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

17
LINES

< > BotCompany Repo | #1004181 // makeAndroidTempDir - in app-internal space

JavaX fragment (include)

static long makeAndroidTempDir_lastValue;

static File makeAndroidTempDir() {
  File dir = new File((File) call(androidContext, "getFilesDir"),
    ".javax/" + makeAndroidTempDir_newValue());
  dir.mkdirs();
  return dir;
}

static long makeAndroidTempDir_newValue() {
  long value;
  do
    value = System.currentTimeMillis();
  while (value == makeAndroidTempDir_lastValue);
  makeAndroidTempDir_lastValue = value;
  return value;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1004181
Snippet name: makeAndroidTempDir - in app-internal space
Eternal ID of this version: #1004181/1
Text MD5: 3c9b84820357786bfa14ee20190278f3
Author: stefan
Category: javax / android
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-08-09 15:24:58
Source code size: 450 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 508 / 506
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)