Skip to main content
1-Visitor
November 1, 2019
Question

How to use in my code. "FileTransferSubsystem"

  • November 1, 2019
  • 1 reply
  • 695 views

 

I wish sending local file to thingworx server pc.

 

Is this right?

 

invokeService has timeout so I confused copy function timeout.

 

com.thingworx.types.collections.ValueCollection vc = new com.thingworx.types.collections.ValueCollection();

vc.SetStringValue("sourceRepo", "");//i don't know this

vc.SetStringValue("sourcePath", @"c:\\test");

vc.SetStringValue("sourceFile", "test.txt");

//elide

//elide

invokeService(ThingworxEntityTypes.Resources, " FileTransferSubsystem", "Copy", vc, 10000);

 

  • Copy

    public InfoTable Copy(java.lang.String sourceRepo,
     java.lang.String sourcePath,
     java.lang.String sourceFile,
     java.lang.String targetRepo,
     java.lang.String targetPath,
     java.lang.String targetFile,
     java.lang.Integer timeout,
     java.lang.Boolean async)
     throws java.lang.Exception

1 reply

22-Sapphire I
November 1, 2019

When you do the configuration for the agent, you should be configuring repos (file storage locations) on the drive that will have an alias, that would be the sourceRepo