# Path: devicecloud/sci.py
# class DeviceTarget(TargetABC):
#     """Target a specific device"""
# 
#     def __init__(self, device_id):
#         self._device_id = device_id
# 
#     def to_xml(self):
#         return '<device id="{}"/>'.format(self._device_id)
# 
# Path: devicecloud/apibase.py
# class SCIAPIBase(object):
#     """Base class for API classes using SCI to communicate
# 
#     :type _sci_api: devicecloud.sci.ServerCommandInterfaceAPI
#     """
#     def __init__(self, sci_api):
#         self._sci_api = sci_api


import base64
import xml.etree.ElementTree as ET
import six
from collections import namedtuple
from devicecloud.sci import DeviceTarget
from devicecloud.apibase import SCIAPIBase
    def parse_response(cls, response, **kwargs):
        """Parse the server response for this put file command

        This will parse xml of the following form::

          <rm />

        or with an error::

            <rm>
                <error ... />
            </rm>

        :param response: The XML root of the response for a delete file command
        :type response: :class:`xml.etree.ElementTree.Element`
        :return: None if everything was ok or an :class:`~ErrorInfo` if the xml contained an error
        """
        if response.tag != cls.command_name:
            raise ResponseParseError(
                "Received response of type {}, DeleteCommand can only parse responses of type {}".format(response.tag,
                                                                                                         cls.command_name))
        error = response.find('./error')
        if error is not None:
            return _parse_error_tree(error)
        return None


FILE_SYSTEM_COMMANDS = [LsCommand, GetCommand, PutCommand, DeleteCommand]



# Path: devicecloud/sci.py
# class DeviceTarget(TargetABC):
#     """Target a specific device"""
# 
#     def __init__(self, device_id):
#         self._device_id = device_id
# 
#     def to_xml(self):
#         return '<device id="{}"/>'.format(self._device_id)
# 
# Path: devicecloud/apibase.py
# class SCIAPIBase(object):
#     """Base class for API classes using SCI to communicate
# 
#     :type _sci_api: devicecloud.sci.ServerCommandInterfaceAPI
#     """
#     def __init__(self, sci_api):
#         self._sci_api = sci_api


# Path: devicecloud/file_system_service.py
import base64
import xml.etree.ElementTree as ET
import six
from collections import namedtuple
from devicecloud.sci import DeviceTarget
from devicecloud.apibase import SCIAPIBase

    def parse_response(cls, response, **kwargs):
        """Parse the server response for this put file command

        This will parse xml of the following form::

          <rm />

        or with an error::

            <rm>
                <error ... />
            </rm>

        :param response: The XML root of the response for a delete file command
        :type response: :class:`xml.etree.ElementTree.Element`
        :return: None if everything was ok or an :class:`~ErrorInfo` if the xml contained an error
        """
        if response.tag != cls.command_name:
            raise ResponseParseError(
                "Received response of type {}, DeleteCommand can only parse responses of type {}".format(response.tag,
                                                                                                         cls.command_name))
        error = response.find('./error')
        if error is not None:
            return _parse_error_tree(error)
        return None


FILE_SYSTEM_COMMANDS = [LsCommand, GetCommand, PutCommand, DeleteCommand]



class FileSystemServiceAPI(SCIAPIBase):