Ejemplo n.º 1
0
def print_xtaf(part):
    """ Prints out information about an XTAF partition """
    print "\n*********************"
    print part
    print "*********************"
    print "\nFILE LISTING"
    for filename in part.allfiles:
        fi = part.allfiles[filename]
        if fi.fr:
            print "File: %s\t%d" % (filename, fi.fr.fsize)
            print "%s\t%s\t%s\n" % (time.ctime(xboxtime.fat2unixtime(fi.fr.mtime, fi.fr.mdate)),\
                                        time.ctime(xboxtime.fat2unixtime(fi.fr.atime, fi.fr.adate)),\
                                        time.ctime(xboxtime.fat2unixtime(fi.fr.ctime, fi.fr.cdate)))
Ejemplo n.º 2
0
def print_stfs(stf):
    """ Prints out information contained in the provided STFS object """
    print "\n*********************"
    print stf
    print "*********************"
    #TODO: Include some of the header data
    print "Name: ", stf.display_name
    print "Description: ", stf.display_description
    print "\nFILE LISTING"
    for filename in stf.allfiles:
        fl = stf.allfiles[filename]
        print "%s\t%s\t %d\t %s " % (time.ctime(xboxtime.fat2unixtime(fl.utime, fl.udate)),\
                                    time.ctime(xboxtime.fat2unixtime(fl.atime, fl.adate)),\
                                    fl.size, filename)
Ejemplo n.º 3
0
 def print_stfs(self, stf):
     """ Prints out information contained in the provided STFS object """
     self.output("\n*********************")
     self.output(stf)
     self.output("*********************")
     #TODO: Include some of the header data
     self.output("Name: %s" % str(stf.display_name))
     self.output("Description: %s" % str(stf.display_description))
     self.output("\nFILE LISTING")
     for filename in stf.allfiles:
         fl = stf.allfiles[filename]
         self.output("%s\t%s\t %d\t %s " % (time.ctime(xboxtime.fat2unixtime(fl.utime, fl.udate)),\
                                     time.ctime(xboxtime.fat2unixtime(fl.atime, fl.adate)),\
                                     fl.size, filename))
Ejemplo n.º 4
0
 def print_xtaf(self, part):
     """ Prints out information about an XTAF partition """
     self.output("\n*********************")
     self.output(part)
     self.output("*********************")
     self.output("\nFILE LISTING")
     #for filename in part.allfiles:
     for filename in part.walk():
         fi = part.get_file(filename)
         if fi.fr:
             self.output("File: %s\t%d" % (filename, fi.fr.fsize))
             self.output("%s\t%s\t%s\n" % (time.ctime(xboxtime.fat2unixtime(fi.fr.mtime, fi.fr.mdate)),\
                                         time.ctime(xboxtime.fat2unixtime(fi.fr.atime, fi.fr.adate)),\
                                         time.ctime(xboxtime.fat2unixtime(fi.fr.ctime, fi.fr.cdate))))