Libraryless. Click here for Pure Java version (11117L/62K).
1 | svoid thinAProgramsBackups_v2(S progID, bool doIt) {
|
2 | File dir = programDir(progID); |
3 | thinAProgramsBackups_v2(dir, doIt); |
4 | } |
5 | |
6 | svoid thinAProgramsBackups_v2(File dir, bool doIt) {
|
7 | print("Processing backups in " + dir);
|
8 | |
9 | var backupDir = newFile(dir, "backups"); |
10 | |
11 | new BackupThinner bt; |
12 | bt.setDir(backupDir); |
13 | bt.scan(); |
14 | |
15 | int numDeleted = 0; |
16 | for (File f : bt.deletableFiles) {
|
17 | if (doIt) {
|
18 | print("Deleting: " + f);
|
19 | f.delete(); |
20 | } else |
21 | print("Would delete: " + f);
|
22 | } |
23 | } |
Began life as a copy of #1011269
download show line numbers debug dex old transpilations
Travelled to 1 computer(s): mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1038778 |
| Snippet name: | thinAProgramsBackups_v2 |
| Eternal ID of this version: | #1038778/3 |
| Text MD5: | 555b8cae23b63be8e6ce1bcdc58e5234 |
| Transpilation MD5: | 3b75e4e547f9becff885f95281beaf31 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2025-04-20 19:38:04 |
| Source code size: | 531 bytes / 23 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 2735 / 3016 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |