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

9
LINES

< > BotCompany Repo | #1016009 // renameFileToSomeBackupName

JavaX fragment (include)

1  
static File renameFileToSomeBackupName(File f) {
2  
  ret renameFileToSomeBackupName(f, "backup");
3  
}
4  
5  
static File renameFileToSomeBackupName(File f, S code) {
6  
  File f2 = fileInSameDir(f, f.getName() + "." + code + "." + ymd_minus_hms());
7  
  renameFile_assertTrue(f, f2);
8  
  ret f2;
9  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016009
Snippet name: renameFileToSomeBackupName
Eternal ID of this version: #1016009/3
Text MD5: 04269f0f184cbc00419571bd3f514acb
Author: stefan
Category: javax / io
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-15 17:02:41
Source code size: 287 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 396 / 386
Version history: 2 change(s)
Referenced in: [show references]