ファイル転送 - xDeviceFileTranfer

Define_Com Class(#xDeviceFileTransfer) Name(#FileTransfer)

Evtroutine Handling(#COM_OWNER.Initialize)
  #ServerUrl := 'http://10.5.1.270:6501/service/longreach.jsp'
  #Userid := 'MYUSER'
  #Password := ''
  #LocalFile := '/myfiles/file1'
  #RemoteFile := '/longreachdata/user/{NAME}/file1'
  #Transfer.Enabled := false
Endroutine

Evtroutine Handling(#FileTransfer.Initialize)
  #Transfer.Enabled := true
  #FileTransfer.RemoteServerUrl := 'http://10.5.1.270:6501/service/longreach.jsp'
Endroutine

Evtroutine Handling(#Transfer.Click)
  #FileTransfer.RemoteServerUser := #Userid
  #FileTransfer.RemoteServerPassword := #Password
  #FileTransfer.LocalFile := #LocalFile
  #FileTransfer.RemoteFile := #RemoteFile

  If (#Upload.ButtonChecked)
    #FileTransfer.Upload
  Else
    #FileTransfer.Download
  Endif
 
Endroutine

Evtroutine Handling(#FileTransfer.Completed) Status(#lstatus) Message(#lMessage)
  #Status := #returnedStatus
  If (#Status <> OK)
    #StatusMessage := #message
  Endif
Endroutine