#!/usr/bin/env python

import mobius
import sys

def print_filesystems (disk):
  for fs in disk.get_filesystems ():
    print
    print '   Type: %s' % fs.type
    print '   Offset: 0x%08x' % fs.offset
    print '   Size: %d bytes' % fs.size
    print '   Name: %s' % fs.name

    for key, value in fs.metadata.value.iteritems ():
      print '   %s: %s' % (key, value)

for url in sys.argv[1:]:
   print
   print ">>", url

   disk = mobius.disk.new_disk_from_url (url)

   if disk.is_available ():
     print_filesystems (disk)
