Example #1
0
 def exists(self, path):
     """Check if the given path exists. The 'path' variable can be a string or a list of strings."""
     res = checkArgumentFormat(path)
     if not res["OK"]:
         return res
     urls = res["Value"]
     successful = {}
     failed = {}
     serviceClient = Client(url=self.url)
     for url in urls:
         gLogger.debug("DIPStorage.exists: Determining existence of %s." % url)
         res = serviceClient.exists(url)
         if res["OK"]:
             successful[url] = res["Value"]
         else:
             failed[url] = res["Message"]
     resDict = {"Failed": failed, "Successful": successful}
     return S_OK(resDict)