Logo Search packages:      
Sourcecode: calibre version File versions

def calibre::devices::prs500::driver::PRS500::total_space (   self,
  end_session = True 
)

Get total space available on the mountpoints:
  1. Main memory
  2. Memory Stick
  3. SD Card

@return: A 3 element list with total space in bytes of (1, 2, 3)

Reimplemented from calibre::devices::interface::DevicePlugin.

Definition at line 588 of file driver.py.

00588                                            :
        """
        Get total space available on the mountpoints:
          1. Main memory
          2. Memory Stick
          3. SD Card

        @return: A 3 element list with total space in bytes of (1, 2, 3)
        """
        data = []
        for path in ("/Data/", "a:/", "b:/"):
            # Timeout needs to be increased as it takes time to read card
            res = self.send_validated_command(TotalSpaceQuery(path), \
                        timeout=5000)
            buffer_size = 16 + res.data[2]
            pkt = self._bulk_read(buffer_size, data_type=TotalSpaceAnswer, \
                                    command_number=TotalSpaceQuery.NUMBER)[0]
            data.append( pkt.total )
        return data

    @safe
    def card_prefix(self, end_session=True):


Generated by  Doxygen 1.6.0   Back to index