code: def dumplist(args):
    
  
    from .query import Database
    db = Database()
  
    r = db.objects(
        protocol=args.protocol,
        purposes=args.purpose,
        model_ids=(args.client,),
        groups=args.group,
        classes=args.sclass
    )
  
    output = sys.stdout
    if args.selftest:
      from bob.db.utils import null
      output = null()
  
    for f in r:
      output.write('%s\n' % (f.make_path(args.directory, args.extension),))
  
    return 0
docs: Dumps lists of files based on your criteria