Libraryless. Click here for Pure Java version (114L/1K/4K).
1 | !747 |
2 | |
3 | m {
|
4 | static S snippetID = "#1001048"; // just a test program |
5 | static boolean testRun; |
6 | |
7 | p {
|
8 | for (S arg: args) |
9 | if (arg.equals("-test")) testRun = true;
|
10 | else |
11 | snippetID = arg; |
12 | |
13 | File dir = programDir(snippetID); |
14 | print("Clearing: " + dir);
|
15 | |
16 | deleteDirectory(dir, true, testRun); |
17 | |
18 | if (!testRun) |
19 | if (dir.exists()) |
20 | print("Problem? Directory still exists.");
|
21 | else |
22 | print("Done, ok, directory gone. Hopefully it wasn't important!");
|
23 | } |
24 | } |
Began life as a copy of #1001050
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1001059 |
| Snippet name: | Clear data directory of a program |
| Eternal ID of this version: | #1001059/1 |
| Text MD5: | 421c12af86a839b44c921d153302786d |
| Transpilation MD5: | 5d2801dc7b286a29590863963eb2f523 |
| Author: | stefan |
| Category: | |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-09-18 19:50:58 |
| Source code size: | 535 bytes / 24 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 891 / 1006 |
| Referenced in: | [show references] |