|
1 | 1 | //%attributes = {} |
2 | | -var $ftp : cs:C1710.FileTransfer_curl |
| 2 | +var $ftp_c : cs:C1710.FileTransfer_curl |
| 3 | +var $ftp_r : cs:C1710.FileTransfer_rclone |
3 | 4 | var $progressid; $source; $target; $answer; $text; $path : Text |
4 | 5 | var $checkstop; $result : Object |
5 | 6 | var $list : Collection |
6 | 7 |
|
7 | | -$ftp:=cs:C1710.FileTransfer_curl.new("download.4d.com"; ""; ""; "https") |
| 8 | +$ftp_c:=cs:C1710.FileTransfer_curl.new("download.4d.com"; ""; ""; "https") |
8 | 9 |
|
9 | 10 | $progressid:="Download 4D.dmg" |
10 | 11 | $checkstop:=New shared object:C1526("stop"; False:C215) |
11 | | -$ftp.enableStopButton($checkstop) |
12 | | -$ftp.useCallback(Formula:C1597(ProgressCallback); $progressid) |
| 12 | +$ftp_c.enableStopButton($checkstop) |
| 13 | +$ftp_c.useCallback(Formula:C1597(ProgressCallback); $progressid) |
13 | 14 |
|
14 | 15 | $source:="/Products/4D_v19R5/Installers/4D_v19_R5_Mac.dmg" |
15 | 16 | $target:=System folder:C487(Desktop:K41:16)+"4d.dmg" |
16 | 17 | $target:=Convert path system to POSIX:C1106($target) |
17 | | -$ftp.setCurlPrefix("--location") // follow 301 or 302 |
18 | | -$result:=$ftp.download($source; $target) |
| 18 | +$ftp_c.setCurlPrefix("--location") // follow 301 or 302 |
| 19 | +$result:=$ftp_c.download($source; $target) |
19 | 20 |
|
20 | 21 | // did user canceled? |
21 | 22 | If ($checkstop.stop=True:C214) |
|
28 | 29 | End if |
29 | 30 |
|
30 | 31 |
|
31 | | -$ftp:=cs:C1710.FileTransfer_rclone.new("gdrive") |
| 32 | +$ftp_r:=cs:C1710.FileTransfer_rclone.new("gdrive") |
32 | 33 | $path:="/users/thomas/Desktop/rclone-v1.59.1-osx-arm64/rclone" |
33 | | -$ftp.setPath($path) |
34 | | -$result:=$ftp.getDirectoryListing("/") |
| 34 | +$ftp_r.setPath($path) |
| 35 | +$result:=$ftp_r.getDirectoryListing("/") |
35 | 36 | If ($result.success) |
36 | 37 | $list:=$result.list |
37 | 38 | $text:=JSON Stringify:C1217($list) |
|
42 | 43 | End if |
43 | 44 |
|
44 | 45 |
|
45 | | -$ftp:=cs:C1710.FileTransfer_rclone.new("gdrive") |
| 46 | +$ftp_r:=cs:C1710.FileTransfer_rclone.new("gdrive") |
46 | 47 | $path:="/users/thomas/Desktop/rclone-v1.59.1-osx-arm64/rclone" |
47 | | -$ftp.setPath($path) |
| 48 | +$ftp_r.setPath($path) |
48 | 49 | $progressid:="Download zipg" |
49 | 50 | $checkstop:=New shared object:C1526("stop"; False:C215) |
50 | | -$ftp.enableStopButton($checkstop) |
51 | | -$ftp.useCallback(Formula:C1597(ProgressCallback); $progressid) |
| 51 | +$ftp_r.enableStopButton($checkstop) |
| 52 | +$ftp_r.useCallback(Formula:C1597(ProgressCallback); $progressid) |
52 | 53 |
|
53 | 54 | $source:="/16-10_CookieBaseWebAuth.zip" |
54 | 55 | $target:=System folder:C487(Desktop:K41:16)+"test.zip" |
55 | 56 | $target:=Convert path system to POSIX:C1106($target) |
56 | | -$result:=$ftp.download($source; $target) |
| 57 | +$result:=$ftp_r.download($source; $target) |
57 | 58 |
|
58 | 59 | // did user canceled? |
59 | 60 | If ($checkstop.stop=True:C214) |
|
0 commit comments