Gitlab Community Edition Instance

Commit 0a2ae0fd authored by Marcel Hellkamp's avatar Marcel Hellkamp
Browse files

More options for CDStar.list_files()

parent e8b36063
......@@ -189,7 +189,8 @@ class CDStar:
return"POST", vault, archive, data=form.body,
headers={'Content-Type': form.content_type})
def list_files(self, vault, archive, offset=0, limit=100):
def list_files(self, vault, archive, offset=0, limit=100, meta=False, order=None, reverse=False,
include_glob=None, exclude_glob=None):
""" Request a FileList for an archive.
The FileList may be incomplete of more than `limit` files are in an archive. See iter_files() for a
......@@ -197,6 +198,17 @@ class CDStar:
query = {"files": "true", "offset": offset, "limit": limit}
if include_glob:
query["include"] = include_glob
if exclude_glob:
query["exclude"] = exclude_glob
if meta:
query["with"] = "meta"
if order:
query["order"] = order
if reverse:
query["reverse"] = "True"
return"GET", vault, archive, params=query)
def iter_files(self, vault, archive, offset=0, **args):
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