示例#1
0
    def check_consistency(drive):
        print('Checking %r consistency' % (drive,))
        total = ut.get_total_diskbytes(drive.root_dpath)
        free = ut.get_free_diskbytes(drive.root_dpath)
        used = total - free
        print('total             = %r' % (total,))
        print('used              = %r' % (used,))
        print('drive.total_bytes = %r' % (drive.total_bytes,))

        print('total             = %r' % (ut.byte_str2(total),))
        print('used              = %r' % (ut.byte_str2(used),))
        print('drive.total_bytes = %r' % (ut.byte_str2(drive.total_bytes),))
示例#2
0
    def check_consistency(drive):
        print('Checking %r consistency' % (drive, ))
        total = ut.get_total_diskbytes(drive.root_dpath)
        free = ut.get_free_diskbytes(drive.root_dpath)
        used = total - free
        print('total             = %r' % (total, ))
        print('used              = %r' % (used, ))
        print('drive.total_bytes = %r' % (drive.total_bytes, ))

        print('total             = %r' % (ut.byte_str2(total), ))
        print('used              = %r' % (ut.byte_str2(used), ))
        print('drive.total_bytes = %r' % (ut.byte_str2(drive.total_bytes), ))
示例#3
0
 def get_infostr(drive, extra=False):
     drive.num_fpaths = len(drive.fpath_list)
     infostr_list = [str(drive)]
     drive.get_filesize_errors()
     nan_fpaths = drive.get_filesize_errors()
     infostr_list += ['#nan fsize fpaths = %r' % (len(nan_fpaths),)]
     if extra:
         infostr_list += ['#nan_fpaths = %r' % (nan_fpaths[0:10],)]
     total_drive_bytes = ut.get_total_diskbytes(drive.root_dpath)
     infostr_list += [('total drive size = %r' % (ut.byte_str2(total_drive_bytes),))]
     infostr_list += [('drive.num_fpaths = %r' % (drive.num_fpaths,))]
     infostr = '\n'.join(infostr_list)
     return infostr
示例#4
0
 def get_infostr(drive, extra=False):
     drive.num_fpaths = len(drive.fpath_list)
     infostr_list = [str(drive)]
     drive.get_filesize_errors()
     nan_fpaths = drive.get_filesize_errors()
     infostr_list += ['#nan fsize fpaths = %r' % (len(nan_fpaths), )]
     if extra:
         infostr_list += ['#nan_fpaths = %r' % (nan_fpaths[0:10], )]
     total_drive_bytes = ut.get_total_diskbytes(drive.root_dpath)
     infostr_list += [
         ('total drive size = %r' % (ut.byte_str2(total_drive_bytes), ))
     ]
     infostr_list += [('drive.num_fpaths = %r' % (drive.num_fpaths, ))]
     infostr = '\n'.join(infostr_list)
     return infostr