Init the default resource directories
330258
protected function initResourceDir()
    {
        $this->resourceDir = [];

        $this->addResourceDir($this->getBBDir().'/Resources');

        if (is_dir($this->getBaseRepository().'/Resources')) {
            $this->addResourceDir($this->getBaseRepository().'/Resources');
        }

        if (is_dir($this->getBaseRepository().'/Ressources')) {
            $this->addResourceDir($this->getBaseRepository().'/Ressources');
        }

        if ($this->hasContext()) {
            if (is_dir($this->getRepository().'/Resources')) {
                $this->addResourceDir($this->getRepository().'/Resources');
            }

            if (is_dir($this->getRepository().'/Resources')) {
                $this->addResourceDir($this->getRepository().'/Resources');
            }
        }

        array_map(['BackBee\Utils\File\File', 'resolveFilepath'], $this->resourceDir);
    }
908547
protected function initDefaultFiles()
    {
        $logDir = $this->getParam(DirectoryKeys::VAR_LOG) . DIRECTORY_SEPARATOR;
        $this->setParam(FileKeys::APPSERVER_ERRORS_LOG, ParamNode::TYPE_STRING, $logDir . 'appserver-errors.log');
        $this->setParam(FileKeys::APPSERVER_ACCESS_LOG, ParamNode::TYPE_STRING, $logDir . 'appserver-access.log');
    }
250250
def vcs_init(self):
        """"""
        VCS(os.path.join(self.outdir, self.name), self.pkg_data)
343781
public void init() {
        if (manifests == null) {
            manifests = new ArrayList<>();
            
            try {
                primaryManifest = addToList(applicationContext.getResource(MANIFEST_PATH));
                Resource[] resources = applicationContext.getResources("classpath*:/" + MANIFEST_PATH);

                for (Resource resource : resources) {
                    Manifest manifest = addToList(resource);
                    
                    if (primaryManifest == null) {
                        primaryManifest = manifest;
                    }
                }

            } catch (Exception e) {
                log.error("Error enumerating manifests.", e);
            }

        }
    }
1280680
def initialize():
        
        from zsl.interface.web.performers.default import create_not_found_mapping
        from zsl.interface.web.performers.resource import create_resource_mapping

        create_not_found_mapping()
        create_resource_mapping()
112331
def init(scope, app, settings):
    """"""
    cfg = settings.get('rw.static', {})
    static = Static()
    scope['static'] = static
    scope['template_env'].globals['static'] = static
    for base_uri, sources in cfg.items():
        full_paths = []
        for source in sources:
            if isinstance(source, dict):
                full_path = source['path']
                full_paths.append(full_path.format(**os.environ))
                continue
            elif ',' in source:
                module_name, path = [part.strip()
                                     for part in source.split(',')]
            else:
                module_name = source
                path = 'static'
            full_path = pkg_resources.resource_filename(module_name, path)
            full_paths.append(full_path)

        app.root.mount('/' + base_uri + '/<h>/<path:path>',
                       StaticHandler, {'path': full_paths},
                       name='static_' + base_uri.replace('.', '_'))

        static.handlers.append((base_uri, StaticHandler, full_paths))
    static.setup()
1166582
def init_module(filesystem):
    """"""
    # pylint: disable=protected-access
    FakePath.filesystem = filesystem
    FakePathlibModule.PureWindowsPath._flavour = _FakeWindowsFlavour(
        filesystem)
    FakePathlibModule.PurePosixPath._flavour = _FakePosixFlavour(filesystem)
283557
public function initialize() {
    $this->drupalVmAlias = $this->getConfigValue('project.machine_name') . '.local';
    $this->drupalVmVersionConstraint = '^5.0';
    $this->defaultDrupalVmDrushAliasesFile = $this->getConfigValue('blt.root') . '/scripts/drupal-vm/drupal-vm.site.yml';
    $this->defaultDrupalVmConfigFile = $this->getConfigValue('blt.root') . '/scripts/drupal-vm/config.yml';
    $this->defaultDrupalVmVagrantfile = $this->getConfigValue('blt.root') . '/scripts/drupal-vm/Vagrantfile';
    $this->projectDrushAliasesFile = $this->getConfigValue('drush.alias-dir') . '/' . $this->getConfigValue('project.machine_name') . '.site.yml';
    $this->projectDrupalVmVagrantfile = $this->getConfigValue('repo.root') . '/Vagrantfile';
    $this->projectDrupalVmConfigFile = $this->getConfigValue('vm.config');
    $this->vmDir = dirname($this->projectDrupalVmConfigFile);
    $this->vmConfigDir = str_replace($this->getConfigValue('repo.root') . DIRECTORY_SEPARATOR, '', $this->vmDir);
    $path_parts = explode(DIRECTORY_SEPARATOR, $this->projectDrupalVmConfigFile);
    $this->vmConfigFile = array_pop($path_parts);
  }
1210837
protected function init()
    {
        foreach($this->excludePaths as $i => $path)
        {
            if(!$this->excludePaths[$i] = realpath($path))
            {
                unset($this->excludePaths[$i]);
            }
        }
        $this->excludeRule = implode('|', array_map('\Imi\Util\Imi::parseRule', $this->excludePaths));
        foreach($this->includePaths as $i => $path)
        {
            if(!$this->includePaths[$i] = $path = realpath($path))
            {
                unset($this->includePaths[$i]);
                continue;
            }
            $directory = new \RecursiveDirectoryIterator($path, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS);
            $iterator = new \RecursiveIteratorIterator($directory);
            if('' === $this->excludeRule)
            {
                foreach($iterator as $fileName => $fileInfo)
                {
                    $this->parseInitFile($fileName);
                }
            }
            else
            {
                $rule = "/^(?!{$this->excludeRule}).+$/i";
                $regex = new \RegexIterator($iterator, $rule, \RecursiveRegexIterator::GET_MATCH);
                foreach ($regex as $item)
                {
                    $this->parseInitFile($item[0]);
                }
            }
        }
    }
1350881
public function init() {
    // Get default properties from project.
    $this->alias = $this->getProject()->getProperty('drush.alias');
    $this->root = $this->getProject()->getProperty('drush.root');
    $this->uri = $this->getProject()->getProperty('drush.uri');
    $this->bin = $this->getProject()->getProperty('drush.bin');
    $this->config = $this->getProject()->getProperty('drush.config');
    $this->aliasPath = $this->getProject()->getProperty('drush.alias-path');
    $this->color = $this->getProject()->getProperty('drush.color');
  }
852785
def install_resources
      FileUtils.mkdir_p(resources_dir)

      installed_resources = []
      resources.each do |file|
        begin
          dst = resources_dir + file.basename
          if file.exist? && !dst.exist?
            FileUtils.cp_r(file, resources_dir)
            installed_resources << dst
          end
        rescue ArgumentError => exc
          unless exc.message =~ /same file/
            raise
          end
        end
      end

      installed_resources
    end
1021941
public void initResourceDir (String resourceDir)
    {
        // if none was specified, check the resource_dir system property
        if (resourceDir == null) {
            try {
                resourceDir = System.getProperty("resource_dir");
            } catch (SecurityException se) {
                // no problem
            }
        }

        // if we found no resource directory, don't use one
        if (resourceDir == null) {
            return;
        }

        // make sure there's a trailing slash
        if (!resourceDir.endsWith(File.separator)) {
            resourceDir += File.separator;
        }
        _rdir = new File(resourceDir);
    }
151501
private void initFileSystem() throws IOException {
		if (fs == null) {
			Path path = new Path(basePath);
			fs = createHadoopFileSystem(path, fsConfig);
		}
	}
695608
public void init(CmsObject cms, List<CmsResource> resources) {

        m_cms = cms;
        m_resources = resources;
    }
909356
def init(ctx, client, directory, name, force, use_external_storage):
    """"""
    if not client.use_external_storage:
        use_external_storage = False

    ctx.obj = client = attr.evolve(
        client,
        path=directory,
        use_external_storage=use_external_storage,
    )

    msg = 'Initialized empty project in {path}'
    branch_name = None

    stack = contextlib.ExitStack()

    if force and client.repo:
        msg = 'Initialized project in {path} (branch {branch_name})'
        merge_args = ['--no-ff', '-s', 'recursive', '-X', 'ours']

        try:
            commit = client.find_previous_commit(
                str(client.renku_metadata_path),
            )
            branch_name = 'renku/init/' + str(commit)
        except KeyError:
            from git import NULL_TREE
            commit = NULL_TREE
            branch_name = 'renku/init/root'
            merge_args.append('--allow-unrelated-histories')

        ctx.obj = client = stack.enter_context(
            client.worktree(
                branch_name=branch_name,
                commit=commit,
                merge_args=merge_args,
            )
        )

    try:
        with client.lock:
            path = client.init_repository(name=name, force=force)
    except FileExistsError:
        raise click.UsageError(
            'Renku repository is not empty. '
            'Please use --force flag to use the directory as Renku '
            'repository.'
        )

    stack.enter_context(client.commit())

    with stack:
        # Install Git hooks.
        from .githooks import install
        ctx.invoke(install, force=force)

        # Create all necessary template files.
        from .runner import template
        ctx.invoke(template, force=force)

    click.echo(msg.format(path=path, branch_name=branch_name))
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
1058879
private void initStandaAloneServices() {
        Set<String> serviceSet = new LinkedHashSet<>();
        addDefaultServices(serviceSet);
        addRequiredServices(serviceSet);
        addConfiguredStorageServices(serviceSet);
        initServices(serviceSet);
    }