X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2833e72b9373d50b232d248b04e8154fbdc220ff..f5bd38d4b168540ddb0e33db9e35a51ec5d60c17:/sdk/python/bin/arv-ls diff --git a/sdk/python/bin/arv-ls b/sdk/python/bin/arv-ls index cccce59c81..23b99f24ce 100755 --- a/sdk/python/bin/arv-ls +++ b/sdk/python/bin/arv-ls @@ -1,34 +1,7 @@ #!/usr/bin/env python -import argparse -import hashlib -import os -import re -import string import sys -import logging -logger = logging.getLogger(os.path.basename(sys.argv[0])) +from arvados.commands.ls import main -parser = argparse.ArgumentParser( - description='List contents of a manifest') - -parser.add_argument('locator', type=str, - help=""" -Collection locator -""") - -parser.add_argument('-s', action='store_true', help="""List file sizes, in KiB.""") - -args = parser.parse_args() - -import arvados - -cr = arvados.CollectionReader(arvados.Keep.get(args.locator)) - -for f in cr.all_files(): - if args.s: - print "{:>10} {}".format((f.size() + 1023) / 1024, - f.stream_name() + "/" + f.name()) - else: - print f.stream_name() + "/" + f.name() +sys.exit(main(sys.argv[1:], sys.stdout, sys.stderr))