6 import arvados.commands._util as arv_cmd
8 parser = argparse.ArgumentParser(
9 description='List contents of a manifest',
10 parents=[arv_cmd.retry_opt])
12 parser.add_argument('locator', type=str,
13 help="Collection UUID or locator")
14 parser.add_argument('-s', action='store_true', help="""List file sizes, in KiB.""")
16 args = parser.parse_args()
17 cr = arvados.CollectionReader(args.locator, num_retries=args.retries)
19 for f in cr.all_files():
21 print "{:>10} {}".format((f.size() + 1023) / 1024,
22 f.stream_name() + "/" + f.name())
24 print f.stream_name() + "/" + f.name()