1 | svoid dm_syncDirectoryToOtherMachine(File dir, S computerID, S remotePath) { |
2 | print("Syncing dir " + dir + " to " + computerID + ":" + remotePath); |
3 | new L<File> dirs; |
4 | for ping (File f : listFiles_noSymLinks(dir)) { |
5 | S remote = addSlash(remotePath) + f.getName(); |
6 | if (isDirectory(f)) dirs.add(f); |
7 | else |
8 | dm_sendFileToOtherMachineIfDifferent(f, computerID, remote); |
9 | } |
10 | |
11 | for ping(File f : dirs) { |
12 | S remote = addSlash(remotePath) + f.getName(); |
13 | dm_syncDirectoryToOtherMachine(f, computerID, remote); |
14 | } |
15 | print("Synced dir " + dir + " to " + computerID + ":" + remotePath); |
16 | } |
Began life as a copy of #1020607
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: | #1020618 |
Snippet name: | dm_syncDirectoryToOtherMachine - doesn't delete files. makes backups for changed files |
Eternal ID of this version: | #1020618/4 |
Text MD5: | 26ac0b93a5e0563a43765ecd3ac93cf0 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-28 18:45:57 |
Source code size: | 619 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 287 / 320 |
Version history: | 3 change(s) |
Referenced in: | [show references] |