def getDirectorySize(self, path): """Get the size of the contents of the directory""" res = checkArgumentFormat(path) if not res["OK"]: return res urls = res["Value"] successful = {} failed = {} gLogger.debug("DIPStorage.isDirectory: Attempting to determine whether %s paths are directories." % len(urls)) serviceClient = Client(url=self.url) for url in urls: res = serviceClient.getDirectorySize(url) if not res["OK"]: failed[url] = res["Message"] else: successful[url] = {"Files": 0, "Size": res["Value"], "SubDirs": 0} resDict = {"Failed": failed, "Successful": successful} return S_OK(resDict)