Sets up the target path and creates it if it does not exist
171494
protected function setupTargetPath($image)
    {
        $this->thumbnailPath = dirname($image) . '/' . $this->thumbnailsFolder . '/';
        if (!is_dir($this->thumbnailPath)) {
            $filesystem = new Filesystem();
            $filesystem->mkdir($this->thumbnailPath);
        }
    }
417324
def create_directory(self, path):
        
        _complain_ifclosed(self.closed)
        return self.fs.create_directory(path)
64176
def ensure_dir(path):
    """"""
    if not (os.path.exists(path) and
            os.path.isdir(path)):
        os.mkdir(path)
84324
def set_local_path(directory, create_dir=False):
    
    if not os.path.exists(directory) and create_dir is True:
        os.makedirs(directory)

    if not os.path.exists(directory) and create_dir is False:
        raise AttributeError("Path '%s' does not exist, to make it pass create_dir=True to rinocloud.set_local_path" % directory)

    if os.path.isdir(directory):
        rinocloud.path = directory

    return directory
670495
def make_sure_path_exists(self, path):
        
        try:
            os.makedirs(path)
        except OSError as exception:
            if exception.errno != errno.EEXIST:
                raise
907273
def add_path(self, path):
        
        abspath = os.path.abspath(path)
        self.children.append(_build_project_tree(abspath, self.followsymlinks, self.file_filter))
1262796
def ensure_dir_exists(path):
    
    dir_path = os.path.dirname(path)
    if not os.path.exists(dir_path):
        os.makedirs(dir_path)
76734
def _setup_output(self, path, force):
        ''''''
        # Allow for special case of output being a pipe
        if os.path.isdir(path) or os.path.isfile(path):
            if force:
                logging.warn("Deleting previous file/directory '%s'" % path)
                if os.path.isfile(path):
                    os.remove(path)
                else:
                    shutil.rmtree(path)
            else:
                raise Exception("Cowardly refusing to overwrite already existing path at %s" % path)
105038
def _set_WorkingDir(self, path):
        
        self._curr_working_dir = path
        try:
            mkdir(self.WorkingDir)
        except OSError:
            # Directory already exists
            pass
895439
def setup(self, target_directory=None):  # pylint: disable=arguments-differ
    
    self._target_directory = target_directory
    if not target_directory:
      self._target_directory = tempfile.mkdtemp()
    elif not os.path.exists(target_directory):
      try:
        os.makedirs(target_directory)
      except OSError as exception:
        message = 'An unknown error occurred: {0!s}'.format(exception)
        self.state.add_error(message, critical=True)
19213
def set_path (self, path):
        
        assert isinstance(path, basestring)
        self.path_ = os.path.normpath(path)
686767
def initialize(self):
        
        if not os.path.exists(self.root_dir):
            os.makedirs(self.root_dir)
        assert os.path.isdir(self.root_dir), "%s is not a directory! Please move or remove it." % self.root_dir
        for d in ["bin", "lib", "include"]:
            target_path = os.path.join(self.root_dir, d)
            if not os.path.exists(target_path):
                os.makedirs(target_path)
        if not os.path.exists(self.manifest_path):
            open(self.manifest_path, "w+").close()
        self.new = False
8311
def ensure_directory(path):
    
    dirname = os.path.dirname(path)
    if not os.path.exists(dirname):
        os.makedirs(dirname)
678468
def _create_path(self, *args):
        """"""
        args = filter(None, args)
        path = self.endpoint + '/'.join(args)
        return path
836292
def create_path(path, is_dir=False):
    
    path = norm_path(path)
    path_check = path
    if not is_dir:
        path_check = os.path.dirname(path)

    does_path_exists = os.path.exists(path_check)

    if does_path_exists:
        return path

    try:
        os.makedirs(path_check)
    except OSError:
        pass

    return path
385348
def _create_project(self, path):
        """"""
        self.open_project(path=path)
        self.setup_menu_actions()
        self.add_to_recent(path)
222505
def set(path, value)
      path = path.split(/\./) if path.is_a?(String)
      target = self
      while path.size > 1
        key = path.shift
        if !(target.key?(key) && target[key].is_a?(::Hash))
          target[key] = Sycl::Hash.new
        else
          target[key] = Sycl::Hash.from_hash(target[key])
        end
        target = target[key]
      end
      target[path.first] = value
    end