Libraryless. Click here for Pure Java version (1798L/12K).
1 | svoid copyDirectory(File src, File dest) { |
2 | if (dest.exists()) |
3 | fail("copyDirectory: " + f2s(dest) + " exists"); |
4 | if (sameCanonicalPath(src, dest)) |
5 | ret; |
6 | if (inPhysicalSubdirectory(dest, src)) |
7 | fail("copyDirectory: " + canonicalPath(dest) + " is subdirectory of " + canonicalPath(src)); |
8 | dest.mkdirs(); |
9 | copyAllFilesInDirectory_rec_noOverwrite(src, dest); |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020320 |
Snippet name: | copyDirectory - ensures the dest doesn't exist yet [dev.] |
Eternal ID of this version: | #1020320/3 |
Text MD5: | 955b8b8b1d1c3d542f040ad7c3d5223d |
Transpilation MD5: | 7c92f0fec5c9ae9cde29cdb3ac76f4f1 |
Author: | stefan |
Category: | javax / io |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-08-04 13:46:18 |
Source code size: | 381 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 250 / 318 |
Version history: | 2 change(s) |
Referenced in: | [show references] |