# 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
        self.path = path
        self._exists = False

        if path:
            self._create()


    def __repr__(self):
        return '<app-dir: %s>' % (self.path)


    def __getattribute__(self, name):

        if not name in ('_exists', 'path', '_create', '_raise_if_none'):
            if not self._exists:
                self._create()
        return object.__getattribute__(self, name)


    def _raise_if_none(self):
        """Raises if operations are carried out on an unconfigured AppDir."""
        if not self.path:
            raise NotConfigured()


    def _create(self):
        """Creates current AppDir at AppDir.path."""

        self._raise_if_none()
        if not self._exists:

# 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

        self.path = path
        self._exists = False

        if path:
            self._create()


    def __repr__(self):
        return '<app-dir: %s>' % (self.path)


    def __getattribute__(self, name):

        if not name in ('_exists', 'path', '_create', '_raise_if_none'):
            if not self._exists:
                self._create()
        return object.__getattribute__(self, name)


    def _raise_if_none(self):
        """Raises if operations are carried out on an unconfigured AppDir."""
        if not self.path:
            raise NotConfigured()


    def _create(self):
        """Creates current AppDir at AppDir.path."""

        self._raise_if_none()
        if not self._exists:

            mkdir_p(self.path)