Setup the storage directory path value and ensure the path exists.

        :rtype: str
        :raises: tinman.exceptions.ConfigurationException
510542
def _setup_storage_dir(self):
        
        dir_path = self._settings.get(config.DIRECTORY)
        if dir_path is None:
            dir_path = self._default_path
            if not os.path.exists(dir_path):
                self._make_path(dir_path)
        else:
            dir_path = path.abspath(dir_path)
            if not os.path.exists(dir_path) or not os.path.isdir(dir_path):
                raise exceptions.ConfigurationException(self.__class__.__name__,
                                                        config.DIRECTORY)
        return dir_path.rstrip('/')
1316215
def SetInputSourceConfiguration(self, configuration):
    
    mount_path = configuration.mount_path

    # Remove a trailing path separator from the mount path so the relative
    # paths will start with a path separator.
    if mount_path and mount_path.endswith(os.sep):
      mount_path = mount_path[:-1]

    self._mount_path = mount_path
441675
def ensure_dir(dirname):
  
  try:
    # Tries to create the directory
    os.makedirs(dirname)
  except OSError:
    # Check that the directory exists
    if os.path.isdir(dirname): pass
    else: raise
3596
def ensure_directory_exists(self):
        
        if not os.path.isdir(self.directory):
            msg = "The password storage directory doesn't exist! (%s)"
            raise MissingPasswordStoreError(msg % self.directory)
835933
def _create_structure(self):
        """"""

        # Ensure that the specified path does not exist and create it.
        if os.path.exists(self._abspath):
            raise(StorageBrokerOSError(
                "Path already exists: {}".format(self._abspath)
            ))

        # Make sure the parent directory exists.
        parent, _ = os.path.split(self._abspath)
        if not os.path.isdir(parent):
            raise(StorageBrokerOSError(
                "No such directory: {}".format(parent)))

        os.mkdir(self._abspath)

        # Create more essential subdirectories.
        for abspath in self._essential_subdirectories:
            if not os.path.isdir(abspath):
                os.mkdir(abspath)
1293723
def setup(self, paths=None):  # pylint: disable=arguments-differ
    
    if not paths:
      self.state.add_error(
          'No `paths` argument provided in recipe, bailing', critical=True)
    else:
      self._paths = [path.strip() for path in paths.strip().split(',')]
477430
def set_folder(self, folder):
        
        self.folder = folder
        self.templates.directories[0] = folder
        self.app.root_path = folder
630920
def ensure_dir(path):
    
    if not os.path.exists(path):
        # path does not exist, create the directory
        os.mkdir(path)
    else:
        # The path exists, check that it is not a file
        if os.path.isfile(path):
            raise Exception("Path %s already exists, and it is a file, not a directory" % path)
26281
def _setup(self):
        
        if not os.path.isdir(self.inventory_directory):
            os.makedirs(self.inventory_directory)
1338191
def ensure_dir(f):
    
    d = os.path.dirname(f)
    if not os.path.exists(d):
        os.makedirs(d)
1049340
def setup_dir(f):
    ''' 
    '''
    setup_dir = os.path.dirname(os.path.abspath(__file__))

    def wrapped(*args, **kwargs):
        with chdir(setup_dir):
            return f(*args, **kwargs)

    return wrapped
397042
def setup_pathing(self):
        """"""
        self.s3_version_uri = self._path_formatter(self.version)
        self.s3_latest_uri = self._path_formatter("LATEST")
        self.s3_canary_uri = self._path_formatter("CANARY")
        self.s3_alpha_uri = self._path_formatter("ALPHA")
        self.s3_mirror_uri = self._path_formatter("MIRROR")
662038
def set_base_path(self, value):
        
        if config.PATHS not in self.config.application:
            self.config.application[config.PATHS] = dict()

        if config.BASE not in self.config.application[config.PATHS]:
            self.config.application[config.PATHS][config.BASE] = value
416128
def setup_path(dir = nil)
      dir ||= chapter.path
      dir = Tools.valid_path_name(dir)
      name = self.name.tr('/', '')
      file = Dir.entries(dir).find { |f| f[name] } if Dir.exist?(dir)
      path = Tools.file_join(dir, file || name)
      @path = Tools.relative_or_absolute_path(path)
    end
951651
def _create_path_if_not_exist(self, path):
        
        if path and not os.path.exists(path):
            os.makedirs(path)
1299353
def mkdir_p(self, path):
        
        try:
            if not os.path.isdir(path):
                os.makedirs(path)
                self.log.info('Created Directory [ %s ]', path)
        except OSError as exc:
            if exc.errno == errno.EEXIST and os.path.isdir(path):
                pass
            else:
                raise OSError(
                    'The provided path can not be created into a directory.'
                )
243806
def ensure_path_exists(dir_path):
    
    if not os.path.exists(dir_path):
        mkdir(dir_path)
        return True
    return False