Skip to main content
Nov 1, 2019 2:25 AM UTC
Question

How to use in my code. "FileTransferSubsystem"

 

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

Nov 1, 2019 3:06 PM UTC

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