Gitlab Community Edition Instance

Commit e8b36063 authored by Marcel Hellkamp's avatar Marcel Hellkamp
Browse files

Added CDStar.exists()

parent fa857f78
......@@ -144,6 +144,14 @@ class CDStar:
def exists(self, vault, archive=None, file=None):
""" Checks if a vault, archive or file exists """
if file:
return self.raw("HEAD", vault, archive, file, expect_status=[200, 404]).ok
if archive:
return self.raw("HEAD", vault, archive, expect_status=[200, 404]).ok
return self.raw("HEAD", vault, expect_status=[200, 404]).ok
def service_info(self):
""" Get information about the cdstar service instance """
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment