Logo Search packages:      
Sourcecode: calibre version File versions

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

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

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

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

Definition at line 623 of file driver.py.

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

        @return: A 3 element list with free space in bytes of (1, 2, 3)
        """
        data = []
        for path in ("/", "a:/", "b:/"):
            # Timeout needs to be increased as it takes time to read card
            self.send_validated_command(FreeSpaceQuery(path), \
                            timeout=5000)
            pkt = self._bulk_read(FreeSpaceAnswer.SIZE, \
                data_type=FreeSpaceAnswer, \
                command_number=FreeSpaceQuery.NUMBER)[0]
            data.append( pkt.free )
        data = [x for x in data if x != 0]
        data.append(0)
        return data

    def _exists(self, path):


Generated by  Doxygen 1.6.0   Back to index