Ejemplo n.º 1
0
def ipod_capacity(mountpoint = MOUNT_POINT):
    if not os.path.exists(mountpoint):
        raise ValueError("Mount point does not exist")
    device = gpod.itdb_device_new()
    gpod.itdb_device_set_mountpoint(device, mountpoint)
    info = gpod.itdb_device_get_ipod_info(device)
    return int((info.capacity - SIZE_FUDGE) * 1024 * 1024 * 1024)
Ejemplo n.º 2
0
 def ipod_capacity(self):
     if not os.path.exists(self.path):
         raise ValueError("Mount point does not exist")
     device = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(device, self.path)
     info = gpod.itdb_device_get_ipod_info(device)
     print "Capacity: %i" % int((info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
     return int((info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
Ejemplo n.º 3
0
 def ipod_capacity(self):
     if not os.path.exists(self.path):
         raise ValueError("Mount point does not exist")
     device = gpod.itdb_device_new()
     gpod.itdb_device_set_mountpoint(device, self.path)
     info = gpod.itdb_device_get_ipod_info(device)
     print "Capacity: %i" % int(
         (info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)
     return int((info.capacity - iPod.SIZE_FUDGE) * 1024 * 1024 * 1024)