1 | static void backupAndCleanProgramDir(S progID) { |
2 | progID = formatSnippetID(progID); |
3 | File dir = getProgramDir(progID); |
4 | if (!dir.exists()) return; |
5 | File backupDir; |
6 | long date; |
7 | do { |
8 | date = now(); |
9 | backupDir = new File(userHome(), "JavaX-Backup/" + progID + "/" + date); |
10 | } while (backupDir.exists()); |
11 | |
12 | mkdirsForFile(backupDir); |
13 | dir.renameTo(backupDir); |
14 | print("Moved " + dir.getAbsolutePath() + " to " + backupDir.getAbsolutePath()); |
15 | } |
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: | #1001338 |
Snippet name: | backupAndCleanProgramDir |
Eternal ID of this version: | #1001338/1 |
Text MD5: | fc76cb75741f0fbdb0cb1749db3abd50 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2015-10-10 18:13:28 |
Source code size: | 470 bytes / 15 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 630 / 848 |
Referenced in: | [show references] |