# Path: pkg/win32/Python27/Lib/site-packages/clint/utils.py
# def mkdir_p(path):
#     """Emulates `mkdir -p` behavior."""
#     try:
#         makedirs(path)
#     except OSError as exc: # Python >2.5
#         if exc.errno == errno.EEXIST:
#             pass
#         else:
#             raise
# 
# def is_collection(obj):
#     """Tests if an object is a collection. Strings don't count."""
# 
#     if isinstance(obj, basestring):
#         return False
# 
#     return hasattr(obj, '__getitem__')


import errno
from os import remove, removedirs
from os.path import isfile, join as path_join
from .packages.appdirs import AppDirs, AppDirsError
from .utils import mkdir_p, is_collection
            return True

    def delete(self, filename=''):
        """Deletes given file or directory. If no filename is passed, current
        directory is removed.
        """
        self._raise_if_none()
        fn = path_join(self.path, filename)

        try:
            if isfile(fn):
                remove(fn)
            else:
                removedirs(fn)
        except OSError as why:
            if why.errno == errno.ENOENT:
                pass
            else:
                raise why


    def read(self, filename, binary=False):
        """Returns contents of given file with AppDir.
        If file doesn't exist, returns None."""

        self._raise_if_none()
        fn = path_join(self.path, filename)

        if binary:
            flags = 'br'

# Path: pkg/win32/Python27/Lib/site-packages/clint/utils.py
# def mkdir_p(path):
#     """Emulates `mkdir -p` behavior."""
#     try:
#         makedirs(path)
#     except OSError as exc: # Python >2.5
#         if exc.errno == errno.EEXIST:
#             pass
#         else:
#             raise
# 
# def is_collection(obj):
#     """Tests if an object is a collection. Strings don't count."""
# 
#     if isinstance(obj, basestring):
#         return False
# 
#     return hasattr(obj, '__getitem__')


# Path: pkg/win32/Python27/Lib/site-packages/clint/resources.py
import errno
from os import remove, removedirs
from os.path import isfile, join as path_join
from .packages.appdirs import AppDirs, AppDirsError
from .utils import mkdir_p, is_collection

            return True

    def delete(self, filename=''):
        """Deletes given file or directory. If no filename is passed, current
        directory is removed.
        """
        self._raise_if_none()
        fn = path_join(self.path, filename)

        try:
            if isfile(fn):
                remove(fn)
            else:
                removedirs(fn)
        except OSError as why:
            if why.errno == errno.ENOENT:
                pass
            else:
                raise why


    def read(self, filename, binary=False):
        """Returns contents of given file with AppDir.
        If file doesn't exist, returns None."""

        self._raise_if_none()
        fn = path_join(self.path, filename)

        if binary:
            flags = 'br'

        else: