Subversion Repositories freemyipod

Rev

Rev 474 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 474 Rev 475
Line 875... Line 875...
875
        self.logger.info("Writing %08X to volume %s sectors %X - %X..." % (addr, volume, sector, sector + count - 1))
875
        self.logger.info("Writing %08X to volume %s sectors %X - %X..." % (addr, volume, sector, sector + count - 1))
876
        self.emcore.storage_write_sectors_md(volume, sector, count, addr)
876
        self.emcore.storage_write_sectors_md(volume, sector, count, addr)
877
        self.logger.info("done\n")
877
        self.logger.info("done\n")
878
 
878
 
879
    @command
879
    @command
880
    def readrawstoragefile(self, volume, sector, count, file, buffsize = 100000, buffer = None):
880
    def readrawstoragefile(self, volume, sector, count, file, buffsize = 0x100000, buffer = None):
881
        """
881
        """
882
            Reads <count> sectors starting at <sector> from storage <volume> to file <file>,
882
            Reads <count> sectors starting at <sector> from storage <volume> to file <file>,
883
            buffering them in memory at [buffer] in chunks of [buffsize] bytes (both optional).
883
            buffering them in memory at [buffer] in chunks of [buffsize] bytes (both optional).
884
        """
884
        """
885
        volume = self._hexint(volume)
885
        volume = self._hexint(volume)
Line 910... Line 910...
910
            if malloc == True:
910
            if malloc == True:
911
                self.emcore.free(buffer)
911
                self.emcore.free(buffer)
912
        self.logger.info("done\n")
912
        self.logger.info("done\n")
913
 
913
 
914
    @command
914
    @command
915
    def writerawstoragefile(self, volume, sector, count, file, buffsize = 100000, buffer = None):
915
    def writerawstoragefile(self, volume, sector, count, file, buffsize = 0x100000, buffer = None):
916
        """
916
        """
917
            Writes contents of <file> to <count> sectors starting at <sector> on storage <volume>,
917
            Writes contents of <file> to <count> sectors starting at <sector> on storage <volume>,
918
            buffering them in memory at [buffer] in chunks of [buffsize] bytes (both optional).
918
            buffering them in memory at [buffer] in chunks of [buffsize] bytes (both optional).
919
        """
919
        """
920
        volume = self._hexint(volume)
920
        volume = self._hexint(volume)
Line 1003... Line 1003...
1003
        self.logger.info("Renaming " + oldname + " to " + newname + "...")
1003
        self.logger.info("Renaming " + oldname + " to " + newname + "...")
1004
        self.emcore.file_rename(oldname, newname)
1004
        self.emcore.file_rename(oldname, newname)
1005
        self.logger.info(" done\n")
1005
        self.logger.info(" done\n")
1006
 
1006
 
1007
    @command
1007
    @command
1008
    def get(self, remotename, localname, buffsize = 10000, buffer = None):
1008
    def get(self, remotename, localname, buffsize = 0x10000, buffer = None):
1009
        """
1009
        """
1010
            Downloads a file
1010
            Downloads a file
1011
            <remotename>: filename on the device
1011
            <remotename>: filename on the device
1012
            <localname>: filename on the computer
1012
            <localname>: filename on the computer
1013
            [buffsize]: buffer size (optional)
1013
            [buffsize]: buffer size (optional)
Line 1038... Line 1038...
1038
            if malloc == True:
1038
            if malloc == True:
1039
                self.emcore.free(buffer)
1039
                self.emcore.free(buffer)
1040
        self.logger.info(" done\n")
1040
        self.logger.info(" done\n")
1041
 
1041
 
1042
    @command
1042
    @command
1043
    def gettree(self, remotepath, localpath, buffsize = 10000, buffer = None):
1043
    def gettree(self, remotepath, localpath, buffsize = 0x10000, buffer = None):
1044
        """
1044
        """
1045
            Downloads a directory tree
1045
            Downloads a directory tree
1046
            <remotepath>: path on the device
1046
            <remotepath>: path on the device
1047
            <localpath>: path on the computer
1047
            <localpath>: path on the computer
1048
            [buffsize]: buffer size (optional)
1048
            [buffsize]: buffer size (optional)
Line 1072... Line 1072...
1072
        finally:
1072
        finally:
1073
            if malloc == True:
1073
            if malloc == True:
1074
                self.emcore.free(buffer)
1074
                self.emcore.free(buffer)
1075
 
1075
 
1076
    @command
1076
    @command
1077
    def put(self, localname, remotename, buffsize = 10000, buffer = None):
1077
    def put(self, localname, remotename, buffsize = 0x10000, buffer = None):
1078
        """
1078
        """
1079
            Uploads a file
1079
            Uploads a file
1080
            <localname>: filename on the computer
1080
            <localname>: filename on the computer
1081
            <remotename>: filename on the device
1081
            <remotename>: filename on the device
1082
            [buffsize]: buffer size (optional)
1082
            [buffsize]: buffer size (optional)
Line 1109... Line 1109...
1109
            if malloc == True:
1109
            if malloc == True:
1110
                self.emcore.free(buffer)
1110
                self.emcore.free(buffer)
1111
        self.logger.info(" done\n")
1111
        self.logger.info(" done\n")
1112
 
1112
 
1113
    @command
1113
    @command
1114
    def puttree(self, localpath, remotepath, buffsize = 10000, buffer = None):
1114
    def puttree(self, localpath, remotepath, buffsize = 0x10000, buffer = None):
1115
        """
1115
        """
1116
            Uploads a directory tree
1116
            Uploads a directory tree
1117
            <localpath>: path on the computer
1117
            <localpath>: path on the computer
1118
            <remotepath>: path on the device
1118
            <remotepath>: path on the device
1119
            [buffsize]: buffer size (optional)
1119
            [buffsize]: buffer size (optional)