1 | class virtual { |
2 | static java.io.File newFile(String path) { |
3 | return new java.io.File(rebase(path)); |
4 | } |
5 | |
6 | static java.io.File newFile(File base, String path) { |
7 | return new java.io.File(base, path); |
8 | } |
9 | |
10 | static java.io.File newFile(String base, String path) { |
11 | return new java.io.File(rebase(base), path); |
12 | } |
13 | |
14 | static java.io.FileInputStream newFileInputStream(String path) throws java.io.IOException { |
15 | return new java.io.FileInputStream(rebase(path)); |
16 | } |
17 | |
18 | static java.io.FileOutputStream newFileOutputStream(String path) throws java.io.IOException { |
19 | return new java.io.FileOutputStream(rebase(path)); |
20 | } |
21 | |
22 | static String virtual_baseDir = ""; |
23 | |
24 | static String rebase(String path) { |
25 | if (new File(path).isAbsolute()) |
26 | return path; |
27 | else |
28 | return new File(new File(virtual_baseDir), path).getAbsolutePath(); |
29 | } |
30 | } |
Began life as a copy of #2000354
Snippet is not live.
Travelled to 86 computer(s): adtiomwmedle, aoiabmzegqzx, bhatertpkbcr, brfxcrgsgrhg, cahelewubzku, cbybwowwnfue, cfunsshuasjs, cmhtpxxajurv, crvwmplrxojx, dbyzmesgzjrf, ddnzoavkxhuk, dhtvkmknsjym, digkpvzjadop, dsbpoofgtjnx, dyfldxrfteug, ecqjixtmvxlp, egsshdfjpivr, exkalrxbqyxc, fnmrsykwqckh, fumpprspadck, funhxakgkfno, gavnqejikrat, gbdqvketdppm, gkwdfizivqfm, gveowxfxqtil, gwrvuhgaqvyk, hkknpzsgoixq, honjdlwrmtdu, hxnwyiuffukg, igfbtfetlyvk, ipcmaqahdjtn, ishqpsrjomds, jlatgrcjtklg, jrjpqrqxafhk, jtubtzbbkimh, kajysqoxcvfe, kiawvgutsbre, kmhbujppghqa, ldywjnwigrac, lgdvxdgcpgrv, lijxzhtxxnix, liwcxgsjrgqn, lnjhkqwteiwi, lpdgvwnxivlt, lqsqiistucwk, mmaxggujatqf, mnzieskfvskl, mqqgnosmbjvj, mrjhfnjfopze, mrmohjpeebfc, nbgitpuheiab, nmhwwpuvbanc, nrhsverhnpsn, nrtiiiyxqhmw, omrbxrqoiqeh, omzkqqnokwlv, onfqjnomoxuw, onxytkatvevr, owkcekpozlzc, ppwwtnwhztze, pyentgdyhuwx, pzhvpgtvlbxg, qbtsjoyahagl, qhcvkqotyiga, qnhezvwmdcbn, sksrqysvpwbz, skttnvmfkzhq, slhtubpyutdj, teubizvjbppd, tjmheftkjvzt, tslmcundralx, tvejysmllsmz, tzxuzeklshpk, ucpxxyxryupy, ufhdzwgrioxs, ugbnzuvxksoj, umpqpbvfwjre, uzhyvevygbcc, uzolovmvtubr, vouqrxazstgt, vqblocesogdc, whwpvezoxzgq, winwedijdyqq, zndhoewobdyk, zrzaeipbowrh, zudvenktlakg
No comments. add comment
Snippet ID: | #2000355 |
Snippet name: | class virtual (fixed 4) |
Eternal ID of this version: | #2000355/1 |
Text MD5: | 5099bf5718df58190a3852b79b7b0b16 |
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:06:04 |
Source code size: | 894 bytes / 30 lines |
Pitched / IR pitched: | No / Yes |
Views / Downloads: | 664 / 16789 |
Referenced in: | [show references] |