Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1020672 // dm_sendFileToOtherMachine_assumeImmutable - assumes original file is never changed (just possibly grown), and remote file isn't changed either. Also resumes if transfer was incomplete

JavaX fragment (include)

1  
svoid dm_sendFileToOtherMachine_assumeImmutable(File f, S computerID, S remotePath) {
2  
  if (!fileExists(f)) ret;
3  
  long remoteSize = toLong(dm_evalOnOtherMachine(computerID, "fileSize(fileRelativeToUserDir(" + quote(remotePath) + "))"));
4  
  if (eq(remoteSize, fileSize(f))) ret with print("File already sent: " + f);
5  
  
6  
  dm_resumeSendingFileToOtherMachine(f, computerID, remotePath, remoteSize);
7  
  print("File sent to " + computerID + ": " + f);
8  
}

Author comment

Began life as a copy of #1020615

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: #1020672
Snippet name: dm_sendFileToOtherMachine_assumeImmutable - assumes original file is never changed (just possibly grown), and remote file isn't changed either. Also resumes if transfer was incomplete
Eternal ID of this version: #1020672/8
Text MD5: 3ac1120d6986801960310cf3afb78b39
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-30 18:07:59
Source code size: 454 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 274 / 319
Version history: 7 change(s)
Referenced in: [show references]