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??
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
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