static void backupAndCleanProgramDir(S progID) { progID = formatSnippetID(progID); File dir = getProgramDir(progID); if (!dir.exists()) return; File backupDir; long date; do { date = now(); backupDir = new File(userHome(), "JavaX-Backup/" + progID + "/" + date); } while (backupDir.exists()); mkdirsForFile(backupDir); dir.renameTo(backupDir); print("Moved " + dir.getAbsolutePath() + " to " + backupDir.getAbsolutePath()); }
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: | 849 / 1072 | 
| Referenced in: | [show references] |