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

FileRepository Services

AP_9587236
17-Peridot

FileRepository Services

In runtime, if C:\ThingworxStorage\repository\SystemRepository\x\y\z is not in thingworxstorage means, BrowseFileSystem & BrowseDirectory APIs reading the files which is in C:\ThingworxStorage\repository\SystemRepository. Even catch block is not capturing any error. If the path is not present, script should stop and throw error. How to do that??

4 REPLIES 4

First of all I would experiment a little bit with the services to see if there is one that a Try Catch can still help identify.

But else, if you know the structure that should exist, you can always iterate down and use Get Directory services to verify if the folder exists or not.

But GetDirectoryStructure Service of FileRepository doesn't takes any inputs and its output is a infotable. Any service is there which will return whether the path exists or not in boolean value??

It will return an infotable that you can check the content of

slangley
23-Emerald II
(To:AP_9587236)

Hi @AP_9587236.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Announcements