cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

How to send a text file from a client running java sdk to thingworx platform?

dmishra
1-Newbie

How to send a text file from a client running java sdk to thingworx platform?

Hello,

     Please guide me to send a text file using java sdk to thingworx platform

4 REPLIES 4

Hi... you can check FileTransferVirtualThing API

It's in the com.thingworx.communications.client.things.filetransfer package

There's an API overview in your Java SDK zip under doc/html - just open the index.html

ankigupta
5-Regular Member
(To:dmishra)

Hi dibya ranjan mishra​,

Have you looked at the FileTransferExample which is packaged with Java Edge SDK? It should help in your issue.

hello ankit,

     I have gone through the FileTransferExmaple.java and FileTransferExampleHelper.java

     I have a doubt regarding virtual directories. I mean can you explain me the following few lines

this was in the sample code:

     // Add two virtual directories that will act as the root directories

  // in this application's virtual file system.

  // The first field is the name of the directory

  // The second field is the path

  myThing.addVirtualDirectory("in",  "E:/");

  myThing.addVirtualDirectory("out", "E:/");

Hi...

in this example, the virtual directory defines a repository (named "in" or "out") and maps it to E:/ on your disk (absolute path in  the file system)

The description is a bit better in the .NET SDK section of the Help Center though...

You can then use the repository alias later on to directly execute create / read / write actions in the mapped folder.

Cheers,

Michael

Top Tags