class virtual {
static java.io.File newFile(String path) {
return new java.io.File(rebase(path));
}
static java.io.FileInputStream newFileInputStream(String path) throws java.io.IOException {
return new java.io.FileInputStream(rebase(path));
}
static java.io.FileOutputStream newFileOutputStream(String path) throws java.io.IOException {
return new java.io.FileOutputStream(rebase(path));
}
static String virtual_baseDir = "";
static String rebase(String path) {
if (new File(path).isAbsolute())
return path;
else
return new File(new File(virtual_baseDir), path).getAbsolutePath();
}
}Began life as a copy of #2000352
Snippet is not live.
Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #2000353 |
| Snippet name: | class virtual (fixed 3) |
| Eternal ID of this version: | #2000353/1 |
| Text MD5: | 178fb69e33c204814e8fdd9134c180c4 |
| Author: | stefan |
| Category: | javax |
| Type: | New Tinybrain snippet |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-05-12 21:03:17 |
| Source code size: | 668 bytes / 22 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 845 / 185 |
| Referenced in: | #2000354 - class virtual (fixed 4) #3000382 - Answer for ferdie (>> t = 1, f = 0) |