svoid dm_syncDirectoryToOtherMachine(File dir, S computerID, S remotePath) { print("Syncing dir " + dir + " to " + computerID + ":" + remotePath); new L<File> dirs; for ping (File f : listFiles_noSymLinks(dir)) { S remote = addSlash(remotePath) + f.getName(); if (isDirectory(f)) dirs.add(f); else dm_sendFileToOtherMachineIfDifferent(f, computerID, remote); } for ping(File f : dirs) { S remote = addSlash(remotePath) + f.getName(); dm_syncDirectoryToOtherMachine(f, computerID, remote); } print("Synced dir " + dir + " to " + computerID + ":" + remotePath); }
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: | 288 / 320 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |