1 | please include function appendToFile. |
2 | |
3 | static void rotateLogFile(File f) { |
4 | lock appendToFile_lock; |
5 | if (!f.exists()) ret; |
6 | int n = 1; |
7 | File p; |
8 | while ((p = newFile(f.getParentFile(), f.getName() + ".part" + n + ".gz")).exists()) |
9 | ++n; |
10 | gzipFile(f, p); |
11 | assertTrue(f.delete()); |
12 | } |
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: | #1011608 |
Snippet name: | rotateLogFile - store as .partX.gz |
Eternal ID of this version: | #1011608/4 |
Text MD5: | df0bb21391938f29d43033ab68dabf2c |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-11-05 09:32:49 |
Source code size: | 300 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 500 / 488 |
Version history: | 3 change(s) |
Referenced in: | [show references] |