From a0f4903b04cbc6f7cbd6a52d4a9faeee60b2fec9 Mon Sep 17 00:00:00 2001 From: Christian Sakowski Date: Fri, 14 Jul 2023 11:05:09 +0200 Subject: [PATCH 1/2] v20, Properties and declarations added --- .../Sources/Classes/FileTransfer_Dropbox.4dm | 84 ++-- .../Sources/Classes/FileTransfer_GDrive.4dm | 94 ++-- Project/Sources/Classes/FileTransfer_curl.4dm | 79 +++- .../Sources/Classes/FileTransfer_rclone.4dm | 66 +-- .../Classes/SystemWorkerProperties.4dm | 10 + Project/Sources/Classes/_Build.4dm | 21 +- Project/Sources/Methods/Compiler_Methods.4dm | 4 + Project/Sources/Methods/ErrorHandler.4dm | 4 +- Project/Sources/Methods/ProgressCallback.4dm | 6 +- Project/Sources/Methods/__buildComponent.4dm | 6 +- Project/Sources/Methods/test.4dm | 4 + Project/Sources/Methods/test_GDrive.4dm | 3 + Project/Sources/Methods/test_curl.4dm | 10 +- Project/Sources/Methods/test_curl_http.4dm | 3 + Project/Sources/Methods/test_dropbox.4dm | 3 + Project/Sources/Methods/test_rclone.4dm | 7 +- Project/Sources/catalog.4DCatalog | 4 +- Project/Sources/settings.4DSettings | 9 +- Resources/en.lproj/syntaxEN.json | 412 ++++++++++-------- Settings/buildApp.4DSettings | 59 --- 20 files changed, 529 insertions(+), 359 deletions(-) create mode 100644 Project/Sources/Methods/Compiler_Methods.4dm delete mode 100644 Settings/buildApp.4DSettings diff --git a/Project/Sources/Classes/FileTransfer_Dropbox.4dm b/Project/Sources/Classes/FileTransfer_Dropbox.4dm index fc94f75..9d42023 100644 --- a/Project/Sources/Classes/FileTransfer_Dropbox.4dm +++ b/Project/Sources/Classes/FileTransfer_Dropbox.4dm @@ -1,3 +1,7 @@ +property onData : Object +property _return; _Path : Text +property _timeout : Integer + Class constructor() This:C1470.onData:=New object:C1471("text"; "") If (Is macOS:C1572) @@ -13,7 +17,9 @@ Class constructor() //MARK: FileTransfer Function getDirectoryListing($targetpath : Text)->$success : Object - If ($targetpath="") + var $url : Text + + If (Length:C16($targetpath)=0) $targetpath:="/" End if $url:="ls -l "+$targetpath @@ -23,11 +29,14 @@ Function getDirectoryListing($targetpath : Text)->$success : Object This:C1470._parseDirListing($success) End if -Function upload($sourcepath : Text; $targetpath : Text)->$success : Object //$sourcepath just file name for local directory, else full path in POSIX syntax // targetpath is full remote path (starting with /, ending with file name - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function upload($sourcepath : Text; $targetpath : Text)->$success : Object + var $url : Text + var $oldtimeout : Integer + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="put "+$sourcepath+" "+$targetpath $oldtimeout:=This:C1470._timeout @@ -37,11 +46,14 @@ Function upload($sourcepath : Text; $targetpath : Text)->$success : Object $success:=This:C1470._runWorker($url) This:C1470._timeout:=$oldtimeout -Function download($sourcepath : Text; $targetpath : Text)->$success : Object //$sourcepath just file name for local directory, else full path in POSIX syntax // targetpath is full remote path (starting with /, ending with file name - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function download($sourcepath : Text; $targetpath : Text)->$success : Object + var $url : Text + var $oldtimeout : Integer + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="get "+$sourcepath+" "+$targetpath $oldtimeout:=This:C1470._timeout @@ -51,43 +63,47 @@ Function download($sourcepath : Text; $targetpath : Text)->$success : Object $success:=This:C1470._runWorker($url) This:C1470._timeout:=$oldtimeout -Function createDirectory($targetpath : Text)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") - $url:="mkdir "+$targetpath - $success:=This:C1470._runWorker($url) +Function createDirectory($targetpath : Text) : Object + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") + return This:C1470._runWorker("mkdir "+$targetpath) + +Function deleteDirectory($targetpath : Text; $force : Boolean) : Object + var $url : Text -Function deleteDirectory($targetpath : Text; $force : Boolean)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") If ($force) $url:="rm -f "+$targetpath Else $url:="rm "+$targetpath End if - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) -Function deleteFile($targetpath : Text)->$success : Object +Function deleteFile($targetpath : Text) : Object // same as deleteDirectory - ASSERT:C1129($targetpath#""; "target path must not be empty") - $url:="rm "+$targetpath - $success:=This:C1470._runWorker($url) + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") + return This:C1470._runWorker("rm "+$targetpath) -Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function renameFile($sourcepath : Text; $targetpath : Text) : Object + var $url : Text + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="mv "+$sourcepath+" "+$targetpath - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) -Function moveFile($sourcepath : Text; $targetpath : Text)->$success : Object - $success:=This:C1470.renameFile($sourcepath; $targetpath) +Function moveFile($sourcepath : Text; $targetpath : Text) : Object + return This:C1470.renameFile($sourcepath; $targetpath) -Function copyFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function copyFile($sourcepath : Text; $targetpath : Text) : Object + var $url : Text + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="cp "+$sourcepath+" "+$targetpath - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) Function executeCommand($command : Text)->$success : Object - ASSERT:C1129($command#""; "command must not be empty") + ASSERT:C1129(Length:C16($command)>0; "command must not be empty") $success:=This:C1470._runWorker($command) //MARK: Settings @@ -132,6 +148,11 @@ Function wait($max : Integer) // MARK: Internal helper calls Function _parseDirListing($success : Object) + var $col : Collection + var $posSize; $posLast; $posPath : Integer + var $line : Text + var $diritem : Object + $col:=Split string:C1554(String:C10($success.data); This:C1470._return; sk ignore empty strings:K86:1) If (($col.length>0) && ($col[0]="Revision@")) $success.list:=New collection:C1472 @@ -157,6 +178,11 @@ Function _parseDirListing($success : Object) End if Function _runWorker($para : Text)->$result : Object + var $workerpara : cs:C1710.SystemWorkerProperties + var $path; $command; $old : Text + var $worker : Object + var $waittimeout; $pos : Integer + If (This:C1470._Callback#Null:C1517) $workerpara:=cs:C1710.SystemWorkerProperties.new("dropbox"; This:C1470.onData; This:C1470._Callback; This:C1470._CallbackID; This:C1470._enableStopButton) Else diff --git a/Project/Sources/Classes/FileTransfer_GDrive.4dm b/Project/Sources/Classes/FileTransfer_GDrive.4dm index d1b5b9c..b4821e9 100644 --- a/Project/Sources/Classes/FileTransfer_GDrive.4dm +++ b/Project/Sources/Classes/FileTransfer_GDrive.4dm @@ -1,4 +1,10 @@ +property onData : Object +property _Path; _workerpath : Text +property _timeout : Integer + Class constructor() + var $path : Text + This:C1470.onData:=New object:C1471("text"; "") If (Is macOS:C1572) This:C1470._return:=Char:C90(10) @@ -16,8 +22,13 @@ Class constructor() // uses https://github.com/prasmussen/gdrive //MARK: FileTransfer -Function getDirectoryListing($targetpath : Text; $ID : Text; $max : Integer)->$success : Object // $ID prefered option, if missing trying to find via path +Function getDirectoryListing($targetpath : Text; $ID : Text; $max : Integer)->$success : Object + var $url; $folder : Text + var $pos : Integer + var $answer : Object + var $sublist : Collection + If ($max=0) $max:=1000 End if @@ -82,11 +93,16 @@ Function upload($sourcepath : Text; $targetpath : Text)->$success : Object //ASSERT($targetpath#""; "target path must not be empty") $success:=This:C1470._uploadSub($sourcepath; $targetpath) -Function _uploadSub($sourcepath : Text; $targetpath : Text; $mime : Text)->$success : Object // need to find target file name (for --name parameter) and target folder (to find --parent ID) +Function _uploadSub($sourcepath : Text; $targetpath : Text; $mime : Text)->$success : Object + var $name; $targetID; $foldername; $foldername2; $parentfoldername; $url : Text + var $pos; $oldtimeout : Integer + var $answer : Object + var $sublist : Collection + $name:="" $targetID:="" - If ($targetpath#"") + If (Length:C16($targetpath)>0) If ($targetpath="@/") // folder name $name:="" $foldername:=Substring:C12($targetpath; 1; Length:C16($targetpath)-1) @@ -142,7 +158,6 @@ Function _uploadSub($sourcepath : Text; $targetpath : Text; $mime : Text)->$succ $success:=This:C1470._runWorker($url) This:C1470._timeout:=$oldtimeout -Function download($sourcepath : Text; $targetpath : Text; $sourceID : Text; $sourceQuery : Text)->$success : Object //$sourcepath just file name for local directory, else full path in POSIX syntax // targetpath is full remote path (starting with /, ending with file name) or just target folder, ending with / // Gdrive only (then pass "" for sourcepath: @@ -150,19 +165,24 @@ Function download($sourcepath : Text; $targetpath : Text; $sourceID : Text; $sou // SourceQuery = query command, such as name = 'test' and modifiedTime > '2012-06-04T12:00:00' and (mimeType contains 'image/' or mimeType contains 'video/') // if the query returns two files with same name, the files will overwrite themself // always overwrite in targetpath file with given name, both original name and (if passed) renamed name - ASSERT:C1129($targetpath#""; "target path must not be empty") - $success:=This:C1470._downloadSub($sourcepath; $targetpath; $sourceID; $sourceQuery) +Function download($sourcepath : Text; $targetpath : Text; $sourceID : Text; $sourceQuery : Text) : Object + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") + return This:C1470._downloadSub($sourcepath; $targetpath; $sourceID; $sourceQuery) -Function export($sourcepath : Text; $targetpath : Text; $sourceID : Text; $mime : Text)->$success : Object +Function export($sourcepath : Text; $targetpath : Text; $sourceID : Text; $mime : Text) : Object // similar to download, just with forced MIME conversion - ASSERT:C1129($targetpath#""; "target path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") ASSERT:C1129($targetpath#"@/"; "target path must be path to folder, not file") - ASSERT:C1129($mime#""; "mime must not be empty") + ASSERT:C1129(Length:C16($mime)>0; "mime must not be empty") // no sourcequery for export - $success:=This:C1470._downloadSub($sourcepath; $targetpath; $sourceID; ""; $mime) + return This:C1470._downloadSub($sourcepath; $targetpath; $sourceID; ""; $mime) Function _downloadSub($sourcepath : Text; $targetpath : Text; $sourceID : Text; $sourceQuery : Text; $mime : Text)->$success : Object + var $target; $url; $source; $text; $currentname; $newname : Text + var $pos; $oldtimeout : Integer + var $answer : Object + var $sublist : Collection $target:=$targetpath If ($targetpath#"@/") @@ -253,46 +273,52 @@ Function _downloadSub($sourcepath : Text; $targetpath : Text; $sourceID : Text; End if // export / import similar to upload/download, but with document conversion. These commands are GDrive specific -Function import($sourcepath : Text; $targetpath : Text; $mime : Text)->$success : Object +Function import($sourcepath : Text; $targetpath : Text; $mime : Text) : Object //$sourcepath just file name for local directory, else full path in POSIX syntax // targetpath is full remote path (starting with /, ending with file name - ASSERT:C1129($sourcepath#""; "source path must not be empty") + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") //ASSERT($targetpath#""; "target path must not be empty") - ASSERT:C1129($mime#""; "mime must not be empty") - $success:=This:C1470._uploadSub($sourcepath; $targetpath; $mime) + ASSERT:C1129(Length:C16($mime)>0; "mime must not be empty") + return This:C1470._uploadSub($sourcepath; $targetpath; $mime) -Function createDirectory($targetpath : Text)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function createDirectory($targetpath : Text) : Object + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="mkdir "+$targetpath - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) -Function deleteDirectory($targetpath : Text; $force : Boolean)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function deleteDirectory($targetpath : Text; $force : Boolean) : Object + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") If ($force) $url:="rm -f "+$targetpath Else $url:="rm "+$targetpath End if - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) -Function deleteFile($targetpath : Text)->$success : Object // same as deleteDirectory - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function deleteFile($targetpath : Text) : Object + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="rm "+$targetpath - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) -Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function renameFile($sourcepath : Text; $targetpath : Text) : Object + var $url : Text + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="mv "+$sourcepath+" "+$targetpath - $success:=This:C1470._runWorker($url) + return This:C1470._runWorker($url) Function moveFile($sourcepath : Text; $targetpath : Text)->$success : Object $success:=This:C1470.renameFile($sourcepath; $targetpath) Function copyFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="cp "+$sourcepath+" "+$targetpath $success:=This:C1470._runWorker($url) @@ -348,6 +374,11 @@ Function _findLastPos($search : Integer; $string : Text)->$pos : Integer End while Function _parseDirListing($success : Object) + var $col : Collection + var $diritem : Object + var $posName; $posType; $posSize; $posCreated : Integer + var $line : Text + $col:=Split string:C1554(String:C10($success.data); This:C1470._return; sk ignore empty strings:K86:1) If (($col.length>0) && ($col[0]="Id@")) $success.list:=New collection:C1472 @@ -375,6 +406,11 @@ Function _parseDirListing($success : Object) End if Function _runWorker($para : Text)->$result : Object + var $workerpara : cs:C1710.SystemWorkerProperties + var $path; $command; $old : Text + var $worker : Object + var $waittimeout : Integer + If (This:C1470._Callback#Null:C1517) $workerpara:=cs:C1710.SystemWorkerProperties.new("gdrive"; This:C1470.onData; This:C1470._Callback; This:C1470._CallbackID; This:C1470._enableStopButton) Else diff --git a/Project/Sources/Classes/FileTransfer_curl.4dm b/Project/Sources/Classes/FileTransfer_curl.4dm index ed0218a..536db39 100644 --- a/Project/Sources/Classes/FileTransfer_curl.4dm +++ b/Project/Sources/Classes/FileTransfer_curl.4dm @@ -1,5 +1,14 @@ +property _host; _user; _password; _protocol; _return; _range; _prefix; _curlPath : Text +property onData : Object +property _noProgress; _AutoCreateRemoteDir; _AutoCreateLocalDir; _async : Boolean +property _timeout; _connectTimeout; _maxTime : Integer +property _Callback : 4D:C1709.Function +property _enableStopButton : Object + Class constructor($hostname : Text; $username : Text; $password : Text; $protocol : Text) - ASSERT:C1129($hostname#""; "Hostname must not be empty") + var $col : Collection + + ASSERT:C1129(Length:C16($hostname)>0; "Hostname must not be empty") If ($protocol="") $protocol:="ftp-ftps" End if @@ -17,10 +26,11 @@ Class constructor($hostname : Text; $username : Text; $password : Text; $protoco This:C1470._return:=Char:C90(10) //Char(13)+Char(10) End if This:C1470._timeout:=0 - This:C1470._enableStopButton:=False:C215 + This:C1470._enableStopButton:=New shared object:C1526("stop"; False:C215) //MARK: Settings Function validate()->$success : Object + var $url : Text $url:=This:C1470._buildURL() $url+="/" $success:=This:C1470._runWorker($url) @@ -80,9 +90,12 @@ Function enableStopButton($enable : Object) // this is a shared object! This:C1470._enableStopButton:=$enable Function useCallback($callback : 4D:C1709.Function; $ID : Text) + var $doublequotes : Text + ASSERT:C1129(Value type:C1509($callback)=Is object:K8:27; "Callback must be of type function") ASSERT:C1129(OB Instance of:C1731($callback; 4D:C1709.Function); "Callback must be of type function") ASSERT:C1129($ID#""; "Callback ID Method must not be empty") + This:C1470._Callback:=$callback This:C1470._CallbackID:=$ID This:C1470._noProgress:=False:C215 @@ -94,7 +107,11 @@ Function upload($sourcepath : Text; $targetpath : Text; $append : Boolean)->$suc // append: (FTP SFTP) When used in an upload, this makes curl append to the target file instead of overwriting it. // If the remote file does not exist, it will be created. // Note that this flag is ignored by some SFTP servers (including OpenSSH). - ASSERT:C1129($sourcepath#""; "source path must not be empty") + + var $url; $doublequotes : Text + var $oldtimeout : Integer + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") $doublequotes:=Char:C90(Double quote:K15:41) If ($targetpath="") $targetpath:="/" @@ -123,8 +140,12 @@ Function download($sourcepath : Text; $targetpath : Text)->$success : Object "ftp://example.com/file[1-100:10].txt" (steps 10) target needs to be folder, ending with / */ - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + + var $url : Text + var $oldtimeout : Integer + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:=This:C1470._buildURL() If ((This:C1470._AutoCreateLocalDir#Null:C1517) && (This:C1470._AutoCreateLocalDir)) $url:=" --create-dirs "+$url @@ -143,6 +164,8 @@ target needs to be folder, ending with / This:C1470._parseFileListing($success) Function getDirectoryListing($targetpath : Text)->$success : Object + var $url : Text + If ($targetpath="") $targetpath:="/" End if @@ -154,14 +177,17 @@ Function getDirectoryListing($targetpath : Text)->$success : Object End if Function createDirectory($targetpath : Text)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:=This:C1470._buildURL() $url:=$url+$targetpath+" --ftp-create-dirs" $success:=This:C1470._runWorker($url) -Function deleteDirectory($targetpath : Text)->$success : Object // only empty directories can be deleted! - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function deleteDirectory($targetpath : Text)->$success : Object + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:=This:C1470._buildURL() If (This:C1470._protocol#"SFTP") $url:=$url+" -Q "+Char:C90(34)+"RMD "+$targetpath+Char:C90(34) @@ -174,9 +200,10 @@ Function deleteDirectory($targetpath : Text)->$success : Object This:C1470._parseDirListing($success) End if -Function deleteFile($targetpath : Text)->$success : Object // only empty directories can be deleted! - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function deleteFile($targetpath : Text)->$success : Object + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:=This:C1470._buildURL() If (This:C1470._protocol#"SFTP") $url:=$url+" -Q "+Char:C90(34)+"DELE "+$targetpath+Char:C90(34) @@ -190,8 +217,10 @@ Function deleteFile($targetpath : Text)->$success : Object End if Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:=This:C1470._buildURL() If (This:C1470._protocol#"SFTP") $url:=$url+" -Q "+Char:C90(34)+"-RNFR "+$sourcepath+Char:C90(34)+" -Q "+Char:C90(34)+"-RNTO "+$targetpath+Char:C90(34) @@ -205,9 +234,9 @@ Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object This:C1470._parseDirListing($success) End if -Function executeCommand($command : Text)->$success : Object - ASSERT:C1129($command#""; "command must not be empty") - $success:=This:C1470._runWorker($command) +Function executeCommand($command : Text) : Object + ASSERT:C1129(Length:C16($command)>0; "command must not be empty") + return This:C1470._runWorker($command) Function stop() If (This:C1470._worker#Null:C1517) @@ -227,6 +256,12 @@ Function wait($max : Integer) // MARK: Internal helper calls Function _parseDirListing($success : Object) + var $col; $lineitems; $datecol : Collection + var $line : Text + var $diritem : Object + var $year; $month; $day : Integer + var $time : Time + $col:=Split string:C1554(String:C10($success.data); This:C1470._return; sk ignore empty strings:K86:1) $success.list:=New collection:C1472 For each ($line; $col) @@ -249,8 +284,7 @@ Function _parseDirListing($success : Object) $year:=Num:C11($lineitems[6]) $time:=?00:00:00? End if - $date:=Add to date:C393(!00-00-00!; $year; $month; $day) - $diritem.date:=$date + $diritem.date:=Add to date:C393(!00-00-00!; $year; $month; $day) $diritem.time:=$time $diritem.path:=$lineitems[8] $success.list.push($diritem) @@ -265,6 +299,9 @@ Function _parseDirListing($success : Object) End for each Function _parseFileListing($success : Object) + var $col : Collection + var $line : Text + $col:=Split string:C1554(String:C10($success.data); This:C1470._return; sk ignore empty strings:K86:1) $success.list:=New collection:C1472 For each ($line; $col) @@ -308,6 +345,11 @@ Function _buildURL()->$url : Text End case Function _runWorker($para : Text)->$result : Object + var $workerpara : cs:C1710.SystemWorkerProperties + var $path; $command; $old : Text + var $worker : Object + var $waittimeout; $pos : Integer + If (This:C1470._Callback#Null:C1517) $workerpara:=cs:C1710.SystemWorkerProperties.new("curl"; This:C1470.onData; This:C1470._Callback; This:C1470._CallbackID; This:C1470._enableStopButton) Else @@ -375,7 +417,4 @@ Function _runWorker($para : Text)->$result : Object $result:=New object:C1471("success"; False:C215; "responseError"; "Curl execution error") End if ON ERR CALL:C155($old) - - - \ No newline at end of file diff --git a/Project/Sources/Classes/FileTransfer_rclone.4dm b/Project/Sources/Classes/FileTransfer_rclone.4dm index c62c075..cf1e6dd 100644 --- a/Project/Sources/Classes/FileTransfer_rclone.4dm +++ b/Project/Sources/Classes/FileTransfer_rclone.4dm @@ -14,6 +14,8 @@ Class constructor($configname : Text) //MARK: FileTransfer Function getDirectoryListing($targetpath : Text)->$success : Object + var $url; $json : Text + If ($targetpath="") $targetpath:="/" End if @@ -30,12 +32,12 @@ Function getDirectoryListing($targetpath : Text)->$success : Object End if End if - -Function upload($sourcepath : Text; $targetpath : Text)->$success : Object //$sourcepath just file name for local directory, else full path in POSIX syntax // targetpath is full remote path (starting with /, ending with file name - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function upload($sourcepath : Text; $targetpath : Text)->$success : Object + var $url : Text + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="copyto "+This:C1470._wrapLocal($sourcepath)+" "+This:C1470._wrapRemote($targetpath) $success:=This:C1470._runWorker($url) If (($success.data#"") & ($success.data="@error@")) @@ -44,8 +46,9 @@ Function upload($sourcepath : Text; $targetpath : Text)->$success : Object End if Function download($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="copyto "+This:C1470._wrapRemote($sourcepath)+" "+This:C1470._wrapLocal($targetpath) $success:=This:C1470._runWorker($url) If (($success.data#"") & ($success.data="@error@")) @@ -54,18 +57,20 @@ Function download($sourcepath : Text; $targetpath : Text)->$success : Object End if Function syncUp($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="sync "+This:C1470._wrapLocal($sourcepath)+" "+This:C1470._wrapRemote($targetpath) $success:=This:C1470._runWorker($url) - If (($success.data#"") & ($success.data="@error@")) + If ((Length:C16($success.data)>0) & ($success.data="@error@")) $success.success:=False:C215 $success.error:=$success.data End if Function syncDown($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="sync "+This:C1470._wrapRemote($sourcepath)+" "+This:C1470._wrapLocal($targetpath) $success:=This:C1470._runWorker($url) If (($success.data#"") & ($success.data="@error@")) @@ -74,12 +79,14 @@ Function syncDown($sourcepath : Text; $targetpath : Text)->$success : Object End if Function createDirectory($targetpath : Text)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="mkdir "+This:C1470._wrapRemote($targetpath) $success:=This:C1470._runWorker($url) Function deleteDirectory($targetpath : Text; $force : Boolean)->$success : Object - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") If ($force) $url:="purge -f "+This:C1470._wrapRemote($targetpath) Else @@ -87,15 +94,18 @@ Function deleteDirectory($targetpath : Text; $force : Boolean)->$success : Objec End if $success:=This:C1470._runWorker($url) -Function deleteFile($targetpath : Text)->$success : Object // same as deleteDirectory - ASSERT:C1129($targetpath#""; "target path must not be empty") +Function deleteFile($targetpath : Text)->$success : Object + var $url : Text + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="delete "+This:C1470._wrapRemote($targetpath) $success:=This:C1470._runWorker($url) Function renameFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="moveto "+This:C1470._wrapRemote($sourcepath)+" "+This:C1470._wrapRemote($targetpath) $success:=This:C1470._runWorker($url) @@ -103,8 +113,10 @@ Function moveFile($sourcepath : Text; $targetpath : Text)->$success : Object $success:=This:C1470.renameFile($sourcepath; $targetpath) Function copyFile($sourcepath : Text; $targetpath : Text)->$success : Object - ASSERT:C1129($sourcepath#""; "source path must not be empty") - ASSERT:C1129($targetpath#""; "target path must not be empty") + var $url : Text + + ASSERT:C1129(Length:C16($sourcepath)>0; "source path must not be empty") + ASSERT:C1129(Length:C16($targetpath)>0; "target path must not be empty") $url:="copyto "+This:C1470._wrapRemote($sourcepath)+" "+This:C1470._wrapRemote($targetpath) $success:=This:C1470._runWorker($url) If (($success.data#"") & ($success.data#"Transferred@")) @@ -113,10 +125,13 @@ Function copyFile($sourcepath : Text; $targetpath : Text)->$success : Object End if Function executeCommand($command : Text)->$success : Object - ASSERT:C1129($command#""; "command must not be empty") + ASSERT:C1129(Length:C16($command)>0; "command must not be empty") $success:=This:C1470._runWorker($command) Function obscure($password : Text)->$obscured : Text + var $command : Text + var $success : Object + $command:="obscure '"+$password+"'" $success:=This:C1470._runWorker($command) If ($success.success) @@ -174,10 +189,13 @@ Function status()->$status : Object Function wait($max : Integer) This:C1470._worker.wait($max) - - // MARK: Internal helper calls Function _runWorker($para : Text)->$result : Object + var $postfix; $path; $command; $old : Text + var $workerpara : cs:C1710.SystemWorkerProperties + var $worker : Object + var $waittimeout; $pos : Integer + $postfix:="" If (This:C1470._Callback#Null:C1517) $workerpara:=cs:C1710.SystemWorkerProperties.new("rclone"; This:C1470.onData; This:C1470._Callback; This:C1470._CallbackID; This:C1470._enableStopButton) @@ -196,7 +214,6 @@ Function _runWorker($para : Text)->$result : Object $path:="rclone" End if - If (This:C1470._maxTime#Null:C1517) $path+=(" --max-duration "+String:C10(This:C1470._maxTime)) End if @@ -205,9 +222,8 @@ Function _runWorker($para : Text)->$result : Object $path+=(" "+This:C1470._prefix) End if - $command:=$path+" "+$para - If ($postfix#"") + If (Length:C16($postfix)>0) $command:=$command+" "+$postfix End if $old:=Method called on error:C704 diff --git a/Project/Sources/Classes/SystemWorkerProperties.4dm b/Project/Sources/Classes/SystemWorkerProperties.4dm index d290023..3118b20 100644 --- a/Project/Sources/Classes/SystemWorkerProperties.4dm +++ b/Project/Sources/Classes/SystemWorkerProperties.4dm @@ -1,3 +1,8 @@ +property type; encoding; dataType; callbackID; _return : Text +property hideWindow : Boolean +property callback : 4D:C1709.Function +property data; stopbutton; SharedForProgressBar : Object + Class constructor($type : Text; $data : Object; $callback : 4D:C1709.Function; $callbackID : Text; $stopButton : Object) This:C1470.type:=$type This:C1470.encoding:="UTF-8" @@ -22,6 +27,8 @@ Class constructor($type : Text; $data : Object; $callback : 4D:C1709.Function; $ This:C1470.SharedForProgressBar:=New shared object:C1526("ID"; 0; "Stop"; False:C215; "EnableButton"; This:C1470.stopbutton) Function onData($systemworker : Object; $data : Object) + var $pos; $progress : Integer + If ($data.data#Null:C1517) This:C1470.data.text+=String:C10($data.data) End if @@ -56,6 +63,9 @@ Function onData($systemworker : Object; $data : Object) End if Function onDataError($systemworker : Object; $data : Object) + var $pos; $progress : Integer + var $message : Text + // called when data is received from curl or dropbox to handle progress bar // check for stop button in progress bar diff --git a/Project/Sources/Classes/_Build.4dm b/Project/Sources/Classes/_Build.4dm index 4746709..87d4ea0 100644 --- a/Project/Sources/Classes/_Build.4dm +++ b/Project/Sources/Classes/_Build.4dm @@ -1,3 +1,5 @@ +property _SettingsUsed; _Source : Text + Class constructor This:C1470._SettingsUsed:="" This:C1470._Source:="" @@ -9,13 +11,16 @@ Function Compile($options : Object)->$error : Object $error:=Compile project:C1760 End if -Function Build($PathToSettings : Text)->$error : Object // this function uses LAUNCH EXTERNAL PROCESS and not 4D.SystemWorker to allow v19 LTS to use the class +Function Build($PathToSettings : Text)->$error : Object + var $errortext : Text + If (Count parameters:C259>0) This:C1470._SettingsUsed:=$PathToSettings Else This:C1470._SettingsUsed:=File:C1566(Build application settings file:K5:60).platformPath End if + BUILD APPLICATION:C871(This:C1470._SettingsUsed) If (OK=0) @@ -26,6 +31,10 @@ Function Build($PathToSettings : Text)->$error : Object End if Function Notarize($zipfilepath : Text)->$error : Object + var $in; $out; $err; $cmd; $id; $logpath; $out2; $logtext : Text + var $pos : Integer + var $log : Object + ASSERT:C1129($zipfilepath#""; "zip file path must not be empty") $in:="" $out:="" @@ -66,8 +75,12 @@ Function Notarize($zipfilepath : Text)->$error : Object End if -Function Zip($sourcepath : Text; $targetpath : Text)->$error : Object // if $sourcepath is ommitted, it reads path from settings, only for components on Mac +Function Zip($sourcepath : Text; $targetpath : Text)->$error : Object + var $settings; $Found; $settingsXML; $value; $source; $target; $cmd; $in; $in; $err; $out : Text + var $sourcefolder : 4D:C1709.Folder + var $sourcefolderfiles : Collection + If (Count parameters:C259=0) If (This:C1470._SettingsUsed#"") $settings:=File:C1566(This:C1470._SettingsUsed; fk platform path:K87:2).getText() @@ -131,12 +144,14 @@ Function Zip($sourcepath : Text; $targetpath : Text)->$error : Object Function Staple()->$error : Object + var $cmd; $in; $out; $err; $source : Text + $cmd:="xcrun stapler staple '"+Convert path system to POSIX:C1106(This:C1470._Source)+"'" $in:="" $out:="" $err:="" LAUNCH EXTERNAL PROCESS:C811($cmd; $in; $out; $err) - If ($err#"") + If (Length:C16($err)>0) $error:=New object:C1471("success"; False:C215; "log"; "Staple error "+$out) Else $source:=This:C1470._Source diff --git a/Project/Sources/Methods/Compiler_Methods.4dm b/Project/Sources/Methods/Compiler_Methods.4dm new file mode 100644 index 0000000..557322b --- /dev/null +++ b/Project/Sources/Methods/Compiler_Methods.4dm @@ -0,0 +1,4 @@ +//%attributes = {} +C_TEXT:C284(ProgressCallback; $1; $2) +C_LONGINT:C283(ProgressCallback; $3) +C_OBJECT:C1216(ProgressCallback; $4) diff --git a/Project/Sources/Methods/ErrorHandler.4dm b/Project/Sources/Methods/ErrorHandler.4dm index d82827b..5469916 100644 --- a/Project/Sources/Methods/ErrorHandler.4dm +++ b/Project/Sources/Methods/ErrorHandler.4dm @@ -1,3 +1,3 @@ -//%attributes = {} +//%attributes = {"preemptive":"capable"} // do nothing, just to fetch errors -// used in cs.FileTransfer._runWorker() \ No newline at end of file +// used in cs.FileTransfer._runWorker() diff --git a/Project/Sources/Methods/ProgressCallback.4dm b/Project/Sources/Methods/ProgressCallback.4dm index d5946d4..96e16be 100644 --- a/Project/Sources/Methods/ProgressCallback.4dm +++ b/Project/Sources/Methods/ProgressCallback.4dm @@ -1,10 +1,14 @@ //%attributes = {} -#DECLARE($ID : Text; $message : Text; $value : Integer; $sharedForProgressBar : Object) // called from cs.FileTransfer if callback is set via .useCallback() // $ID is set through code - $message comes from curl // shared object to pass progress ID back/forth and to share stop button result +#DECLARE($ID : Text; $message : Text; $value : Integer; $sharedForProgressBar : Object) + +var $ProgressBarID : Integer +var $message2 : Text + $ProgressBarID:=$sharedForProgressBar.ID If (($ProgressBarID=0) && ($value#100)) diff --git a/Project/Sources/Methods/__buildComponent.4dm b/Project/Sources/Methods/__buildComponent.4dm index 9f9c8e9..a416b48 100644 --- a/Project/Sources/Methods/__buildComponent.4dm +++ b/Project/Sources/Methods/__buildComponent.4dm @@ -29,6 +29,9 @@ you might need to start Xcode to accept Apple contract changes or update expired */ var $builder : cs:C1710._Build +var $error : Object +var $target : Text +var $progress : Integer $builder:=cs:C1710._Build.new() @@ -58,8 +61,7 @@ End if Progress QUIT($progress) - If ($error.success=False:C215) ALERT:C41(JSON Stringify:C1217($error; *)) SET TEXT TO PASTEBOARD:C523(JSON Stringify:C1217($error; *)) -End if \ No newline at end of file +End if diff --git a/Project/Sources/Methods/test.4dm b/Project/Sources/Methods/test.4dm index 32ac767..ffb3708 100644 --- a/Project/Sources/Methods/test.4dm +++ b/Project/Sources/Methods/test.4dm @@ -1,5 +1,9 @@ //%attributes = {} var $ftp : cs:C1710.FileTransfer_curl +var $progressid; $source; $target; $answer; $text; $path : Text +var $checkstop; $result : Object +var $list : Collection + $ftp:=cs:C1710.FileTransfer_curl.new("download.4d.com"; ""; ""; "https") $progressid:="Download 4D.dmg" diff --git a/Project/Sources/Methods/test_GDrive.4dm b/Project/Sources/Methods/test_GDrive.4dm index f64e5e1..fcea64b 100644 --- a/Project/Sources/Methods/test_GDrive.4dm +++ b/Project/Sources/Methods/test_GDrive.4dm @@ -1,5 +1,8 @@ //%attributes = {} var $ftp : cs:C1710.FileTransfer_GDrive +var $result; $status; $checkstop : Object +var $source; $answer; $target; $id; $sourcequery; $progressid; $command : Text + $ftp:=cs:C1710.FileTransfer_GDrive.new() //$path:=Get 4D folder(Current resources folder)+"gdrive"+Folder separator+"gdrive.exe" diff --git a/Project/Sources/Methods/test_curl.4dm b/Project/Sources/Methods/test_curl.4dm index cbc2745..708bf96 100644 --- a/Project/Sources/Methods/test_curl.4dm +++ b/Project/Sources/Methods/test_curl.4dm @@ -3,6 +3,13 @@ // url like ftp.4D.com or ftp.4d.com:1234 // if you use ftps or sftp, also modify the last parameter (protocol) in .new() below // don't add the protocol to the hostname, don't use https://xxx or ftp://xxx + +var $ftp : cs:C1710.FileTransfer_curl +var $credentialspath; $credentialsfile; $source; $answer; $error; $progressid; $progressid2; $target : Text +var $folder : 4D:C1709.Folder +var $credentials; $result; $result2; $checkstop; $checkstop2; $status; $status2 : Object +var $list : Collection + $credentialspath:=Get 4D folder:C485(Database folder:K5:14) $folder:=Folder:C1567($credentialspath; fk platform path:K87:2) $credentialsfile:=$folder.parent.file("credentials.txt").getText() @@ -13,7 +20,6 @@ If (False:C215) // $credentials.password:="notmypass" End if -var $ftp : cs:C1710.FileTransfer_curl $ftp:=cs:C1710.FileTransfer_curl.new($credentials.url; $credentials.user; $credentials.pass; "ftp") //$ftp.setPath("/opt/homebrew/opt/curl/bin/curl") //$ftp.setPath("C:\\Users\\thomas.DE\\Documents\\4D\\Komponenten\\curl.exe") @@ -35,8 +41,6 @@ If (False:C215) End if End if - - If (False:C215) $source:=System folder:C487(Desktop:K41:16)+"test2.txt" $source:=Convert path system to POSIX:C1106($source) diff --git a/Project/Sources/Methods/test_curl_http.4dm b/Project/Sources/Methods/test_curl_http.4dm index b761eec..6e99a12 100644 --- a/Project/Sources/Methods/test_curl_http.4dm +++ b/Project/Sources/Methods/test_curl_http.4dm @@ -1,4 +1,7 @@ //%attributes = {} +var $source; $target; $answer; $progressid : Text +var $result; $checkstop : Object + If (False:C215) var $ftp : cs:C1710.FileTransfer_curl $ftp:=cs:C1710.FileTransfer_curl.new("www.4d.com"; ""; ""; "https") diff --git a/Project/Sources/Methods/test_dropbox.4dm b/Project/Sources/Methods/test_dropbox.4dm index b955eee..3d9ba7c 100644 --- a/Project/Sources/Methods/test_dropbox.4dm +++ b/Project/Sources/Methods/test_dropbox.4dm @@ -1,5 +1,8 @@ //%attributes = {} var $ftp : cs:C1710.FileTransfer_Dropbox +var $source; $answer; $target; $progressid : Text +var $result; $status; $checkstop : Object + $ftp:=cs:C1710.FileTransfer_Dropbox.new() $ftp.setPath(" /Users/thomas/Desktop/dbxcli") diff --git a/Project/Sources/Methods/test_rclone.4dm b/Project/Sources/Methods/test_rclone.4dm index 1027e70..41c83eb 100644 --- a/Project/Sources/Methods/test_rclone.4dm +++ b/Project/Sources/Methods/test_rclone.4dm @@ -4,8 +4,13 @@ // if you use ftps or sftp, also modify the last parameter (protocol) in .new() below // don't add the protocol to the hostname, don't use https://xxx or ftp://xxx -$test:="S3" var $ftp : cs:C1710.FileTransfer_rclone +var $test; $path; $credentialspath; $pass; $port; $url; $answer; $source; $error; $progressid; $target; $credentialsfile : Text +var $folder : 4D:C1709.Folder +var $credentials; $result; $checkstop : Object +var $list : Collection + +$test:="S3" $path:="/users/thomas/Desktop/rclone-v1.59.1-osx-arm64/rclone" Case of diff --git a/Project/Sources/catalog.4DCatalog b/Project/Sources/catalog.4DCatalog index 5b5e717..10d8107 100644 --- a/Project/Sources/catalog.4DCatalog +++ b/Project/Sources/catalog.4DCatalog @@ -2,7 +2,7 @@ - - + + \ No newline at end of file diff --git a/Project/Sources/settings.4DSettings b/Project/Sources/settings.4DSettings index e0e7de2..b89093b 100644 --- a/Project/Sources/settings.4DSettings +++ b/Project/Sources/settings.4DSettings @@ -1,8 +1,13 @@ - + - + + + + + + \ No newline at end of file diff --git a/Resources/en.lproj/syntaxEN.json b/Resources/en.lproj/syntaxEN.json index 2dd81bd..ce0dc4a 100644 --- a/Resources/en.lproj/syntaxEN.json +++ b/Resources/en.lproj/syntaxEN.json @@ -1,39 +1,105 @@ { "_method_": {}, + "cs.FileTransfer": { + "SystemWorkerProperties": { + "new()": { + "Syntax": "**.new**( *type* : Text; *data* : Object; *callback* : 4D.Function; *callbackID* : Text; *stopButton* : Object )", + "Params": [ + [ + "type", + "Text", + "->" + ], + [ + "data", + "Object", + "->" + ], + [ + "callback", + "4D.Function", + "->" + ], + [ + "callbackID", + "Text", + "->" + ], + [ + "stopButton", + "Object", + "->" + ] + ], + "Summary": "" + } + }, + "FileTransfer_rclone": { + "new()": { + "Syntax": "**.new**( *configname* : Text )", + "Params": [ + [ + "configname", + "Text", + "->" + ] + ], + "Summary": "" + } + }, + "FileTransfer_curl": { + "new()": { + "Syntax": "**.new**( *hostname* : Text; *username* : Text; *password* : Text; *protocol* : Text )", + "Params": [ + [ + "hostname", + "Text", + "->" + ], + [ + "username", + "Text", + "->" + ], + [ + "password", + "Text", + "->" + ], + [ + "protocol", + "Text", + "->" + ] + ], + "Summary": "" + } + }, + "FileTransfer_Dropbox": { + "new()": { + "Syntax": "**.new**()", + "Params": [], + "Summary": "" + } + }, + "FileTransfer_GDrive": { + "new()": { + "Syntax": "**.new**()", + "Params": [], + "Summary": "" + } + }, + "_Build": { + "new()": { + "Syntax": "**.new**()", + "Params": [], + "Summary": "" + } + } + }, "SystemWorkerProperties": { - "new()": { - "Syntax": "**.new**(*type* : Text; *data* : Object; *callback* : 4D.Function; *callbackID* : Text; *stopButton* : Object)", - "Params": [ - [ - "type", - "Text", - "->" - ], - [ - "data", - "Object", - "->" - ], - [ - "callback", - "4D.Function", - "->" - ], - [ - "callbackID", - "Text", - "->" - ], - [ - "stopButton", - "Object", - "->" - ] - ], - "Summary": "" - }, "onTerminate()": { - "Syntax": "**.onTerminate**(*systemworker* : Object; *data* : Object)", + "Syntax": "**.onTerminate**( *systemworker* : Object; *data* : Object )", "Params": [ [ "systemworker", @@ -49,7 +115,7 @@ "Summary": "" }, "onDataError()": { - "Syntax": "**.onDataError**(*systemworker* : Object; *data* : Object)", + "Syntax": "**.onDataError**( *systemworker* : Object; *data* : Object )", "Params": [ [ "systemworker", @@ -65,7 +131,7 @@ "Summary": "" }, "onData()": { - "Syntax": "**.onData**(*systemworker* : Object; *data* : Object)", + "Syntax": "**.onData**( *systemworker* : Object; *data* : Object )", "Params": [ [ "systemworker", @@ -79,22 +145,38 @@ ] ], "Summary": "" + }, + "SharedForProgressBar": { + "Syntax": "SharedForProgressBar : Object" + }, + "stopbutton": { + "Syntax": "stopbutton : Object" + }, + "data": { + "Syntax": "data : Object" + }, + "hideWindow": { + "Syntax": "hideWindow : Boolean" + }, + "callback": { + "Syntax": "callback : 4D.Function" + }, + "dataType": { + "Syntax": "dataType : Text" + }, + "encoding": { + "Syntax": "encoding : Text" + }, + "callbackID": { + "Syntax": "callbackID : Text" + }, + "type": { + "Syntax": "type : Text" } }, "FileTransfer_rclone": { - "new()": { - "Syntax": "**.new**(*configname* : Text)", - "Params": [ - [ - "configname", - "Text", - "->" - ] - ], - "Summary": "" - }, "wait()": { - "Syntax": "**.wait**(*max* : Integer)", + "Syntax": "**.wait**( *max* : Integer )", "Params": [ [ "max", @@ -116,7 +198,7 @@ "Summary": "" }, "syncUp()": { - "Syntax": "**.syncUp**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.syncUp**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -137,7 +219,7 @@ "Summary": "" }, "createDirectory()": { - "Syntax": "**.createDirectory**(*targetpath* : Text)->success : Object", + "Syntax": "**.createDirectory**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -169,7 +251,7 @@ "Summary": "" }, "enableStopButton()": { - "Syntax": "**.enableStopButton**(*enable* : Object)", + "Syntax": "**.enableStopButton**( *enable* : Object )", "Params": [ [ "enable", @@ -180,7 +262,7 @@ "Summary": "" }, "setAsyncMode()": { - "Syntax": "**.setAsyncMode**(*async* : Boolean)", + "Syntax": "**.setAsyncMode**( *async* : Boolean )", "Params": [ [ "async", @@ -191,7 +273,7 @@ "Summary": "" }, "useCallback()": { - "Syntax": "**.useCallback**(*callback* : 4D.Function; *ID* : Text)", + "Syntax": "**.useCallback**( *callback* : 4D.Function; *ID* : Text )", "Params": [ [ "callback", @@ -207,7 +289,7 @@ "Summary": "" }, "setPrefix()": { - "Syntax": "**.setPrefix**(*prefix* : Text)", + "Syntax": "**.setPrefix**( *prefix* : Text )", "Params": [ [ "prefix", @@ -218,7 +300,7 @@ "Summary": "" }, "setPath()": { - "Syntax": "**.setPath**(*path* : Text)", + "Syntax": "**.setPath**( *path* : Text )", "Params": [ [ "path", @@ -229,7 +311,7 @@ "Summary": "" }, "setMaxTime()": { - "Syntax": "**.setMaxTime**(*seconds* : Real)", + "Syntax": "**.setMaxTime**( *seconds* : Real )", "Params": [ [ "seconds", @@ -251,7 +333,7 @@ "Summary": "" }, "executeCommand()": { - "Syntax": "**.executeCommand**(*command* : Text)->success : Object", + "Syntax": "**.executeCommand**( *command* : Text )->success : Object", "Params": [ [ "command", @@ -267,7 +349,7 @@ "Summary": "" }, "copyFile()": { - "Syntax": "**.copyFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.copyFile**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -288,7 +370,7 @@ "Summary": "" }, "deleteDirectory()": { - "Syntax": "**.deleteDirectory**(*targetpath* : Text; *force* : Boolean)->success : Object", + "Syntax": "**.deleteDirectory**( *targetpath* : Text; *force* : Boolean )->success : Object", "Params": [ [ "targetpath", @@ -309,7 +391,7 @@ "Summary": "" }, "moveFile()": { - "Syntax": "**.moveFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.moveFile**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -330,7 +412,7 @@ "Summary": "" }, "obscure()": { - "Syntax": "**.obscure**(*password* : Text)->obscured : Text", + "Syntax": "**.obscure**( *password* : Text )->obscured : Text", "Params": [ [ "password", @@ -346,7 +428,7 @@ "Summary": "" }, "deleteFile()": { - "Syntax": "**.deleteFile**(*targetpath* : Text)->success : Object", + "Syntax": "**.deleteFile**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -362,7 +444,7 @@ "Summary": "" }, "download()": { - "Syntax": "**.download**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.download**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -383,7 +465,7 @@ "Summary": "" }, "renameFile()": { - "Syntax": "**.renameFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.renameFile**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -404,7 +486,7 @@ "Summary": "" }, "syncDown()": { - "Syntax": "**.syncDown**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.syncDown**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -425,7 +507,7 @@ "Summary": "" }, "upload()": { - "Syntax": "**.upload**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.upload**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -446,7 +528,7 @@ "Summary": "" }, "setTimeout()": { - "Syntax": "**.setTimeout**(*timeout* : Integer)", + "Syntax": "**.setTimeout**( *timeout* : Integer )", "Params": [ [ "timeout", @@ -457,7 +539,7 @@ "Summary": "" }, "getDirectoryListing()": { - "Syntax": "**.getDirectoryListing**(*targetpath* : Text)->success : Object", + "Syntax": "**.getDirectoryListing**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -474,34 +556,8 @@ } }, "FileTransfer_curl": { - "new()": { - "Syntax": "**.new**(*hostname* : Text; *username* : Text; *password* : Text; *protocol* : Text)", - "Params": [ - [ - "hostname", - "Text", - "->" - ], - [ - "username", - "Text", - "->" - ], - [ - "password", - "Text", - "->" - ], - [ - "protocol", - "Text", - "->" - ] - ], - "Summary": "" - }, "wait()": { - "Syntax": "**.wait**(*max* : Integer)", + "Syntax": "**.wait**( *max* : Integer )", "Params": [ [ "max", @@ -523,7 +579,7 @@ "Summary": "" }, "executeCommand()": { - "Syntax": "**.executeCommand**(*command* : Text)->success : Object", + "Syntax": "**.executeCommand**( *command* : Text ) : Object", "Params": [ [ "command", @@ -531,7 +587,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -539,7 +595,7 @@ "Summary": "" }, "deleteFile()": { - "Syntax": "**.deleteFile**(*targetpath* : Text)->success : Object", + "Syntax": "**.deleteFile**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -555,7 +611,7 @@ "Summary": "" }, "download()": { - "Syntax": "**.download**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.download**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -576,7 +632,7 @@ "Summary": "" }, "upload()": { - "Syntax": "**.upload**(*sourcepath* : Text; *targetpath* : Text; *append* : Boolean)->success : Object", + "Syntax": "**.upload**( *sourcepath* : Text; *targetpath* : Text; *append* : Boolean )->success : Object", "Params": [ [ "sourcepath", @@ -602,7 +658,7 @@ "Summary": "" }, "useCallback()": { - "Syntax": "**.useCallback**(*callback* : 4D.Function; *ID* : Text)", + "Syntax": "**.useCallback**( *callback* : 4D.Function; *ID* : Text )", "Params": [ [ "callback", @@ -629,7 +685,7 @@ "Summary": "" }, "setRange()": { - "Syntax": "**.setRange**(*range* : Text)", + "Syntax": "**.setRange**( *range* : Text )", "Params": [ [ "range", @@ -640,7 +696,7 @@ "Summary": "" }, "enableStopButton()": { - "Syntax": "**.enableStopButton**(*enable* : Object)", + "Syntax": "**.enableStopButton**( *enable* : Object )", "Params": [ [ "enable", @@ -651,7 +707,7 @@ "Summary": "" }, "renameFile()": { - "Syntax": "**.renameFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.renameFile**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -672,7 +728,7 @@ "Summary": "" }, "enableProgressData()": { - "Syntax": "**.enableProgressData**(*enable* : Boolean)", + "Syntax": "**.enableProgressData**( *enable* : Boolean )", "Params": [ [ "enable", @@ -683,7 +739,7 @@ "Summary": "" }, "setPath()": { - "Syntax": "**.setPath**(*path* : Text)", + "Syntax": "**.setPath**( *path* : Text )", "Params": [ [ "path", @@ -694,7 +750,7 @@ "Summary": "" }, "setActiveMode()": { - "Syntax": "**.setActiveMode**(*active* : Boolean; *IP* : Text)", + "Syntax": "**.setActiveMode**( *active* : Boolean; *IP* : Text )", "Params": [ [ "active", @@ -710,7 +766,7 @@ "Summary": "" }, "getDirectoryListing()": { - "Syntax": "**.getDirectoryListing**(*targetpath* : Text)->success : Object", + "Syntax": "**.getDirectoryListing**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -726,7 +782,7 @@ "Summary": "" }, "setAutoCreateLocalDirectory()": { - "Syntax": "**.setAutoCreateLocalDirectory**(*auto* : Boolean)", + "Syntax": "**.setAutoCreateLocalDirectory**( *auto* : Boolean )", "Params": [ [ "auto", @@ -737,7 +793,7 @@ "Summary": "" }, "setTimeout()": { - "Syntax": "**.setTimeout**(*timeout* : Integer)", + "Syntax": "**.setTimeout**( *timeout* : Integer )", "Params": [ [ "timeout", @@ -748,7 +804,7 @@ "Summary": "" }, "setAsyncMode()": { - "Syntax": "**.setAsyncMode**(*async* : Boolean)", + "Syntax": "**.setAsyncMode**( *async* : Boolean )", "Params": [ [ "async", @@ -759,7 +815,7 @@ "Summary": "" }, "deleteDirectory()": { - "Syntax": "**.deleteDirectory**(*targetpath* : Text)->success : Object", + "Syntax": "**.deleteDirectory**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -775,7 +831,7 @@ "Summary": "" }, "setCurlPrefix()": { - "Syntax": "**.setCurlPrefix**(*prefix* : Text)", + "Syntax": "**.setCurlPrefix**( *prefix* : Text )", "Params": [ [ "prefix", @@ -786,7 +842,7 @@ "Summary": "" }, "setMaxTime()": { - "Syntax": "**.setMaxTime**(*seconds* : Real)", + "Syntax": "**.setMaxTime**( *seconds* : Real )", "Params": [ [ "seconds", @@ -808,7 +864,7 @@ "Summary": "" }, "setConnectTimeout()": { - "Syntax": "**.setConnectTimeout**(*seconds* : Real)", + "Syntax": "**.setConnectTimeout**( *seconds* : Real )", "Params": [ [ "seconds", @@ -824,7 +880,7 @@ "Summary": "" }, "createDirectory()": { - "Syntax": "**.createDirectory**(*targetpath* : Text)->success : Object", + "Syntax": "**.createDirectory**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -840,7 +896,7 @@ "Summary": "" }, "setAutoCreateRemoteDirectory()": { - "Syntax": "**.setAutoCreateRemoteDirectory**(*auto* : Boolean)", + "Syntax": "**.setAutoCreateRemoteDirectory**( *auto* : Boolean )", "Params": [ [ "auto", @@ -849,14 +905,12 @@ ] ], "Summary": "" + }, + "onData": { + "Syntax": "onData : Object" } }, "FileTransfer_Dropbox": { - "new()": { - "Syntax": "**.new**()", - "Params": [], - "Summary": "" - }, "status()": { "Syntax": "**.status**()->status : Object", "Params": [ @@ -874,7 +928,7 @@ "Summary": "" }, "enableStopButton()": { - "Syntax": "**.enableStopButton**(*enable* : Object)", + "Syntax": "**.enableStopButton**( *enable* : Object )", "Params": [ [ "enable", @@ -885,7 +939,7 @@ "Summary": "" }, "setAsyncMode()": { - "Syntax": "**.setAsyncMode**(*async* : Boolean)", + "Syntax": "**.setAsyncMode**( *async* : Boolean )", "Params": [ [ "async", @@ -896,7 +950,7 @@ "Summary": "" }, "useCallback()": { - "Syntax": "**.useCallback**(*callback* : 4D.Function; *ID* : Text)", + "Syntax": "**.useCallback**( *callback* : 4D.Function; *ID* : Text )", "Params": [ [ "callback", @@ -912,7 +966,7 @@ "Summary": "" }, "setPath()": { - "Syntax": "**.setPath**(*path* : Text)", + "Syntax": "**.setPath**( *path* : Text )", "Params": [ [ "path", @@ -923,7 +977,7 @@ "Summary": "" }, "deleteDirectory()": { - "Syntax": "**.deleteDirectory**(*targetpath* : Text; *force* : Boolean)->success : Object", + "Syntax": "**.deleteDirectory**( *targetpath* : Text; *force* : Boolean ) : Object", "Params": [ [ "targetpath", @@ -936,7 +990,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -955,7 +1009,7 @@ "Summary": "" }, "moveFile()": { - "Syntax": "**.moveFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.moveFile**( *sourcepath* : Text; *targetpath* : Text ) : Object", "Params": [ [ "sourcepath", @@ -968,7 +1022,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -976,7 +1030,7 @@ "Summary": "" }, "renameFile()": { - "Syntax": "**.renameFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.renameFile**( *sourcepath* : Text; *targetpath* : Text ) : Object", "Params": [ [ "sourcepath", @@ -989,7 +1043,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -997,7 +1051,7 @@ "Summary": "" }, "createDirectory()": { - "Syntax": "**.createDirectory**(*targetpath* : Text)->success : Object", + "Syntax": "**.createDirectory**( *targetpath* : Text ) : Object", "Params": [ [ "targetpath", @@ -1005,7 +1059,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1013,7 +1067,7 @@ "Summary": "" }, "copyFile()": { - "Syntax": "**.copyFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.copyFile**( *sourcepath* : Text; *targetpath* : Text ) : Object", "Params": [ [ "sourcepath", @@ -1026,7 +1080,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1034,7 +1088,7 @@ "Summary": "" }, "download()": { - "Syntax": "**.download**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.download**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -1055,7 +1109,7 @@ "Summary": "" }, "executeCommand()": { - "Syntax": "**.executeCommand**(*command* : Text)->success : Object", + "Syntax": "**.executeCommand**( *command* : Text )->success : Object", "Params": [ [ "command", @@ -1071,7 +1125,7 @@ "Summary": "" }, "deleteFile()": { - "Syntax": "**.deleteFile**(*targetpath* : Text)->success : Object", + "Syntax": "**.deleteFile**( *targetpath* : Text ) : Object", "Params": [ [ "targetpath", @@ -1079,7 +1133,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1087,7 +1141,7 @@ "Summary": "" }, "upload()": { - "Syntax": "**.upload**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.upload**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -1108,7 +1162,7 @@ "Summary": "" }, "wait()": { - "Syntax": "**.wait**(*max* : Integer)", + "Syntax": "**.wait**( *max* : Integer )", "Params": [ [ "max", @@ -1119,7 +1173,7 @@ "Summary": "" }, "setTimeout()": { - "Syntax": "**.setTimeout**(*timeout* : Integer)", + "Syntax": "**.setTimeout**( *timeout* : Integer )", "Params": [ [ "timeout", @@ -1130,7 +1184,7 @@ "Summary": "" }, "getDirectoryListing()": { - "Syntax": "**.getDirectoryListing**(*targetpath* : Text)->success : Object", + "Syntax": "**.getDirectoryListing**( *targetpath* : Text )->success : Object", "Params": [ [ "targetpath", @@ -1144,14 +1198,12 @@ ] ], "Summary": "" + }, + "onData": { + "Syntax": "onData : Object" } }, "FileTransfer_GDrive": { - "new()": { - "Syntax": "**.new**()", - "Params": [], - "Summary": "" - }, "status()": { "Syntax": "**.status**()->status : Object", "Params": [ @@ -1164,7 +1216,7 @@ "Summary": "" }, "createDirectory()": { - "Syntax": "**.createDirectory**(*targetpath* : Text)->success : Object", + "Syntax": "**.createDirectory**( *targetpath* : Text ) : Object", "Params": [ [ "targetpath", @@ -1172,7 +1224,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1185,7 +1237,7 @@ "Summary": "" }, "useCallback()": { - "Syntax": "**.useCallback**(*callback* : 4D.Function; *ID* : Text)", + "Syntax": "**.useCallback**( *callback* : 4D.Function; *ID* : Text )", "Params": [ [ "callback", @@ -1201,7 +1253,7 @@ "Summary": "" }, "setPath()": { - "Syntax": "**.setPath**(*path* : Text)", + "Syntax": "**.setPath**( *path* : Text )", "Params": [ [ "path", @@ -1212,7 +1264,7 @@ "Summary": "" }, "executeCommand()": { - "Syntax": "**.executeCommand**(*command* : Text)->success : Object", + "Syntax": "**.executeCommand**( *command* : Text )->success : Object", "Params": [ [ "command", @@ -1228,7 +1280,7 @@ "Summary": "" }, "enableStopButton()": { - "Syntax": "**.enableStopButton**(*enable* : Object)", + "Syntax": "**.enableStopButton**( *enable* : Object )", "Params": [ [ "enable", @@ -1250,7 +1302,7 @@ "Summary": "" }, "moveFile()": { - "Syntax": "**.moveFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.moveFile**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -1271,7 +1323,7 @@ "Summary": "" }, "deleteDirectory()": { - "Syntax": "**.deleteDirectory**(*targetpath* : Text; *force* : Boolean)->success : Object", + "Syntax": "**.deleteDirectory**( *targetpath* : Text; *force* : Boolean ) : Object", "Params": [ [ "targetpath", @@ -1284,7 +1336,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1292,7 +1344,7 @@ "Summary": "" }, "copyFile()": { - "Syntax": "**.copyFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.copyFile**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -1313,7 +1365,7 @@ "Summary": "" }, "setAsyncMode()": { - "Syntax": "**.setAsyncMode**(*async* : Boolean)", + "Syntax": "**.setAsyncMode**( *async* : Boolean )", "Params": [ [ "async", @@ -1324,7 +1376,7 @@ "Summary": "" }, "renameFile()": { - "Syntax": "**.renameFile**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.renameFile**( *sourcepath* : Text; *targetpath* : Text ) : Object", "Params": [ [ "sourcepath", @@ -1337,7 +1389,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1345,7 +1397,7 @@ "Summary": "" }, "export()": { - "Syntax": "**.export**(*sourcepath* : Text; *targetpath* : Text; *sourceID* : Text; *mime* : Text)->success : Object", + "Syntax": "**.export**( *sourcepath* : Text; *targetpath* : Text; *sourceID* : Text; *mime* : Text ) : Object", "Params": [ [ "sourcepath", @@ -1368,7 +1420,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1376,7 +1428,7 @@ "Summary": "" }, "download()": { - "Syntax": "**.download**(*sourcepath* : Text; *targetpath* : Text; *sourceID* : Text; *sourceQuery* : Text)->success : Object", + "Syntax": "**.download**( *sourcepath* : Text; *targetpath* : Text; *sourceID* : Text; *sourceQuery* : Text ) : Object", "Params": [ [ "sourcepath", @@ -1399,7 +1451,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1407,7 +1459,7 @@ "Summary": "" }, "deleteFile()": { - "Syntax": "**.deleteFile**(*targetpath* : Text)->success : Object", + "Syntax": "**.deleteFile**( *targetpath* : Text ) : Object", "Params": [ [ "targetpath", @@ -1415,7 +1467,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1423,7 +1475,7 @@ "Summary": "" }, "getDirectoryListing()": { - "Syntax": "**.getDirectoryListing**(*targetpath* : Text; *ID* : Text; *max* : Integer)->success : Object", + "Syntax": "**.getDirectoryListing**( *targetpath* : Text; *ID* : Text; *max* : Integer )->success : Object", "Params": [ [ "targetpath", @@ -1449,7 +1501,7 @@ "Summary": "" }, "import()": { - "Syntax": "**.import**(*sourcepath* : Text; *targetpath* : Text; *mime* : Text)->success : Object", + "Syntax": "**.import**( *sourcepath* : Text; *targetpath* : Text; *mime* : Text ) : Object", "Params": [ [ "sourcepath", @@ -1467,7 +1519,7 @@ "->" ], [ - "success", + "", "Object", "<-" ] @@ -1475,7 +1527,7 @@ "Summary": "" }, "upload()": { - "Syntax": "**.upload**(*sourcepath* : Text; *targetpath* : Text)->success : Object", + "Syntax": "**.upload**( *sourcepath* : Text; *targetpath* : Text )->success : Object", "Params": [ [ "sourcepath", @@ -1496,7 +1548,7 @@ "Summary": "" }, "wait()": { - "Syntax": "**.wait**(*max* : Integer)", + "Syntax": "**.wait**( *max* : Integer )", "Params": [ [ "max", @@ -1507,7 +1559,7 @@ "Summary": "" }, "setTimeout()": { - "Syntax": "**.setTimeout**(*timeout* : Integer)", + "Syntax": "**.setTimeout**( *timeout* : Integer )", "Params": [ [ "timeout", @@ -1516,16 +1568,14 @@ ] ], "Summary": "" + }, + "onData": { + "Syntax": "onData : Object" } }, "_Build": { - "new()": { - "Syntax": "**.new**()", - "Params": [], - "Summary": "" - }, "Notarize()": { - "Syntax": "**.Notarize**(*zipfilepath* : Text)->error : Object", + "Syntax": "**.Notarize**( *zipfilepath* : Text )->error : Object", "Params": [ [ "zipfilepath", @@ -1552,7 +1602,7 @@ "Summary": "" }, "Build()": { - "Syntax": "**.Build**(*PathToSettings* : Text)->error : Object", + "Syntax": "**.Build**( *PathToSettings* : Text )->error : Object", "Params": [ [ "PathToSettings", @@ -1568,7 +1618,7 @@ "Summary": "" }, "Zip()": { - "Syntax": "**.Zip**(*sourcepath* : Text; *targetpath* : Text)->error : Object", + "Syntax": "**.Zip**( *sourcepath* : Text; *targetpath* : Text )->error : Object", "Params": [ [ "sourcepath", @@ -1589,7 +1639,7 @@ "Summary": "" }, "Compile()": { - "Syntax": "**.Compile**(*options* : Object)->error : Object", + "Syntax": "**.Compile**( *options* : Object )->error : Object", "Params": [ [ "options", diff --git a/Settings/buildApp.4DSettings b/Settings/buildApp.4DSettings deleted file mode 100644 index cda809f..0000000 --- a/Settings/buildApp.4DSettings +++ /dev/null @@ -1,59 +0,0 @@ - - - - - False - True - True - False - - ByAppName - - - - True - - - False - False - False - - - - False - ByAppName - False - - False - False - 1 - - - FileTransfer - ::FileTransfer_Curl_Build: - - 0 - - - 0 - - - 0 - - - 0 - - - - 1 - Macintosh HD:Users:thomas:Library:Application Support:4D:Licenses:R-4UUD190UUS001C189P06F5C.license4D - - - - True - Developer ID Application: 4D Deutschland GmbH (4789QA2D2W) - True - - - - From db9d1601a3d6cee460ca02ffcf101aa9b7683de6 Mon Sep 17 00:00:00 2001 From: Christian Sakowski Date: Fri, 14 Jul 2023 11:41:27 +0200 Subject: [PATCH 2/2] Fixed file parsing with spaces in name --- Project/Sources/Classes/FileTransfer_curl.4dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project/Sources/Classes/FileTransfer_curl.4dm b/Project/Sources/Classes/FileTransfer_curl.4dm index 536db39..922e2e9 100644 --- a/Project/Sources/Classes/FileTransfer_curl.4dm +++ b/Project/Sources/Classes/FileTransfer_curl.4dm @@ -286,7 +286,7 @@ Function _parseDirListing($success : Object) End if $diritem.date:=Add to date:C393(!00-00-00!; $year; $month; $day) $diritem.time:=$time - $diritem.path:=$lineitems[8] + $diritem.path:=($lineitems.slice(8).join(" ")) $success.list.push($diritem) Else // error? If ($col.length=1)