Hi all,
I feel like I'm going crazy with this, but I can't seem to check whether a file exists in a mounted folder in Webdev.
I've tried the following:
- Creating a httpClient and sending a HEAD request to the URL of the file
httpClient = system.net.httpClient()
def checkIfNetworkFileExists(path):
global httpClient
response = httpClient.head(path)
return response.getStatusCode()
=> This gives me a status code 405 "Method not allowed", although I can get the file normally using a GET method.
-
Using the system.file.fileExists function and supplying the URL of my file
=> Returns false although the path is correct -
Using a mesage handler to the gateway, and the gateway then calls system.file.fileExists
=> Returns false as well
The only thing that works is supplying the absolute path to the system.file.fileExists in a message handler to the gateway, but I really want to avoid using this, and instead use the URL if possible...
What am I missing ?
Thanks