def _handle_prepare_file(self, filename_in_storage):
     filename = os.path.join(self._folder_dir, filename_in_storage)
     logging.debug('Prepare file %s -> %s', filename_in_storage, filename)
     if not os.path.isfile(filename):
         logging.error('File is not exist: %s', filename_in_storage)
         return None
     return base_mounter.MounterFile(filename)
    def _handle_prepare_file(self, filename_in_storage):
        filename = os.path.join(self._temp_dir, filename_in_storage)
        logging.info('Prepare file %s -> %s', filename_in_storage, filename)

        self._make_parent_dirs(filename)
        if not adb_utils.pull(filename, filename_in_storage, self._serial_num):
            logging.error('Fail to prepare file: %s', filename_in_storage)
            return None

        return base_mounter.MounterFile(filename)
    def _handle_prepare_file(self, filename_in_storage):
        filespec = os.path.join('/', filename_in_storage)
        out_file = os.path.join(self._temp_dir, filename_in_storage)
        logging.info('Prepare file %s -> %s', filename_in_storage, out_file)

        self._make_parent_dirs(out_file)

        if not debugfs.dump(self._raw_image_file, filespec, out_file):
            logging.error('File does not exist: %s', filename_in_storage)
            return None

        return base_mounter.MounterFile(out_file)
    def _handle_prepare_file(self, filename_in_storage):
        mount_filename = os.path.join(self._mount_point, filename_in_storage)
        filename = os.path.join(self._temp_dir, filename_in_storage)
        logging.info('Prepare file %s -> %s', filename_in_storage, filename)
        if not os.path.isfile(mount_filename):
            logging.error('File does not exist: %s', filename_in_storage)
            return None

        self._make_parent_dirs(filename)
        image_utils.copy_file(filename, mount_filename)

        return base_mounter.MounterFile(filename)