Creates the directory to use for the plugin registry.  The location of
the plugin registry is in the tomcat data directory.
977139
private static File getPluginDir() {
        String dataDirPath = System.getProperty("catalina.home"); //$NON-NLS-1$
        File dataDir = new File(dataDirPath, "data"); //$NON-NLS-1$
        if (!dataDir.getParentFile().isDirectory()) {
            throw new RuntimeException("Failed to find Tomcat home at: " + dataDirPath); //$NON-NLS-1$
        }
        if (!dataDir.exists()) {
            dataDir.mkdir();
        }
        File pluginsDir = new File(dataDir, "apiman/plugins"); //$NON-NLS-1$
        return pluginsDir;
    }
573682
protected function createFolderIfMissing()
    {
        if (!file_exists($this->webPath . '/' . $this->imageFolder)) {
            mkdir($this->webPath . '/' . $this->imageFolder, 0755);
        }
    }
737197
public void makeDir(String dir, String data) {

        try {

            boolean deafult_path_exist = store.exists(dir);
            if (!deafult_path_exist) {
                LOGGER.info("create: " + dir);
                this.writePersistentUrl(dir, data);
            } else {
            }

        } catch (KeeperException e) {

            LOGGER.error("cannot create path: " + dir, e);

        } catch (Exception e) {

            LOGGER.error("cannot create path: " + dir, e);
        }
    }
887182
def make_dir(project):
    
    project_path = os.path.join(os.path.dirname(__file__), project)
    # Delete the directory and the files inside it
    if os.path.exists(project_path):
        shutil.rmtree(project_path)
    # Create the directory
    os.mkdir(project_path)
    # We need a __init__.py file inside the directory
    with open(os.path.join(project_path, '__init__.py'), 'w') as fp:
        fp.write('__version__ = "' + str(get_property('__version__', 'geomdl')) + '"\n')
        fp.write('__author__ = "' + str(get_property('__author__', 'geomdl')) + '"\n')
        fp.write('__license__ = "' + str(get_property('__license__', 'geomdl')) + '"\n')
547757
def create_tomodir(self, directory):
        
        pwd = os.getcwd()
        if not os.path.isdir(directory):
            os.makedirs(directory)
        os.chdir(directory)

        directories = (
            'config',
            'exe',
            'grid',
            'mod',
            'mod/pot',
            'mod/sens',
            'rho',
        )
        for directory in directories:
            if not os.path.isdir(directory):
                os.makedirs(directory)

        os.chdir(pwd)
876140
public static void mkdirs(File directory) throws CreateDirectoryException {
    if (directory.exists()) {
      // file exists and *is* a directory
      if (directory.isDirectory()) {
        return;
      }

      // file exists, but is not a directory - delete it
      if (!directory.delete()) {
        throw new CreateDirectoryException(
            directory.getAbsolutePath(),
            new FileDeleteException(directory.getAbsolutePath()));
      }
    }

    // doesn't exist. Create one
    if (!directory.mkdirs() && !directory.isDirectory()) {
      throw new CreateDirectoryException(directory.getAbsolutePath());
    }
  }
1286363
static void createGeneratedFilesDirectory(String apiName) {
        File folder = new File(getDestinationDirectory(apiName));

        if (!folder.exists()){
            //noinspection ResultOfMethodCallIgnored
            folder.mkdirs();
        }
    }
471763
function createDirectory(options) {
  return new Promise(function(resolve, reject) {
    mkdirp( options.directory, function (err) {
      if(err && err.code !== 'EEXIST') {
        reject(err);
      } else {
        resolve(options);
      }
    });
  });
}
1370065
private static void createDirectory(final File directory) throws MojoExecutionException
  {

    try {
      com.sap.prd.mobile.ios.mios.FileUtils.deleteDirectory(directory);
    }
    catch (IOException ex) {
      throw new MojoExecutionException("", ex);
    }

    if (!directory.mkdirs())
      throw new MojoExecutionException("Cannot create directory (" + directory + ")");
  }
772854
function copyPlugin(plugin_src_dir, plugins_dir, link, pluginInfoProvider) {
    var pluginInfo = new PluginInfo(plugin_src_dir);
    var dest = path.join(plugins_dir, pluginInfo.id);
    shell.rm('-rf', dest);
    if (link) {
        events.emit('verbose', 'Symlinking from location "' + plugin_src_dir + '" to location "' + dest + '"');
        shell.mkdir('-p', path.dirname(dest));
        fs.symlinkSync(plugin_src_dir, dest, 'dir');
    } else {
        shell.mkdir('-p', dest);
        events.emit('verbose', 'Copying from location "' + plugin_src_dir + '" to location "' + dest + '"');
        shell.cp('-R', path.join(plugin_src_dir, '*') , dest);
    }
    pluginInfo.dir = dest;
    pluginInfoProvider.put(pluginInfo);

    return dest;
}
1156861
public static void createDirectory(final String directory) {
        if (directory == null) return;
        final File f = new File(directory);
        if (!f.isDirectory()) {
            if (!f.mkdir()) throw new RuntimeException("couldn't create "
                    + directory);
        }
    }
885184
def setup_manifest(datadir):
    
    manifest_dir = os.path.join(datadir, "manifest")
    if not os.path.exists(manifest_dir):
        os.makedirs(manifest_dir)
153453
def get_plugin_folders():
    """"""
    folders = []
    defaultfolder = normpath("~/.linkchecker/plugins")
    if not os.path.exists(defaultfolder) and not Portable:
        try:
            make_userdir(defaultfolder)
        except Exception as errmsg:
            msg = _("could not create plugin directory %(dirname)r: %(errmsg)r")
            args = dict(dirname=defaultfolder, errmsg=errmsg)
            log.warn(LOG_CHECK, msg % args)
    if os.path.exists(defaultfolder):
        folders.append(defaultfolder)
    return folders
618442
function buildFromDirectory(dirPath){
	var dbsetPath = path.join(dirPath,"dbsets");
	if(fileutil.isExist(dbsetPath)){
		defaultConfig['dbsets'] = dbsetPath;
	}

	var stubsPath = path.join(dirPath,"stubs");
	if(fileutil.isExist(stubsPath)){
		defaultConfig['stubs'] = stubsPath;
	}

	var dumpsPath = path.join(dirPath,"dumps");
	if(fileutil.isExist(dumpsPath)){
		defaultConfig['dumps'] = dumpsPath;
	}

	var mappingsPath = path.join(dirPath,"mappings");
	var files = fileutil.ls(mappingsPath);
	if(files.length > 0){
		defaultConfig['mappings']['requests'] = [];
		files.forEach(function(filename){
			defaultConfig['mappings']['requests'].push(path.join(mappingsPath , filename));
		});
	}

	var trustStorePath = path.join(dirPath,"truststore");
	if(fileutil.isExist(trustStorePath)){
		defaultConfig.server.key = path.join(trustStorePath , "server.key");
		defaultConfig.server.cert = path.join(trustStorePath , "server.crt");

		var cacertPath = path.join(trustStorePath,"ca");
		var cacerts = fileutil.ls(cacertPath);

		if(cacerts.length > 0){
			defaultConfig.server.ca = [];
			cacerts.forEach(function(filename){
				defaultConfig.server.ca.push(path.join(cacertPath , filename));
			});
		}
	}
}
182856
def create_dir(entry, section, domain, output):
    """"""
    full_output_dir = os.path.join(output, section, domain, entry['assembly_accession'])
    try:
        os.makedirs(full_output_dir)
    except OSError as err:
        if err.errno == errno.EEXIST and os.path.isdir(full_output_dir):
            pass
        else:
            raise

    return full_output_dir
913509
def make_dir(self):
        """"""
        if not os.path.exists(self.dirname):
            os.makedirs(self.dirname)
624072
private void configurePlugins(final File fDir) throws PluginConfigurationException {
        LOG.trace("READING PLUGIN CONFIGURATION FROM DIRECTORY {}", fDir.getName());
        StreamManager streamMgr = new StreamManager();

        File[] vfJars = fDir.listFiles(JAR_FILE_FILTER);

        if (vfJars == null || vfJars.length == 0) {
            return;
        }

        // Initializing classloader
        List<URL> vUrls = new ArrayList<URL>(vfJars.length);

        ClassLoader ul = null;

        for (int j = 0; j < vfJars.length; j++) {
            try {
                vUrls.add(vfJars[j].toURI().toURL());
            } catch (MalformedURLException e) {
                // should never happen
                throw new IllegalStateException(e.getMessage(), e);
            }
        }

        ul = new JNRPEClassLoader(vUrls);

        try {
            for (File file : vfJars) {
                JarFile jarFile = null;
                try {
                    jarFile = new JarFile(file);
                    JarEntry entry = jarFile.getJarEntry("plugin.xml");
                    if (entry == null) {
                        entry = jarFile.getJarEntry("jnrpe_plugins.xml");
                    }

                    if (entry == null) {
                        // The jar do not contain a jnrpe_plugins.xml nor a
                        // plugin.xml file...
                        continue;
                    }

                    InputStream in = streamMgr.handle(jarFile.getInputStream(entry));
                    PluginRepositoryUtil.loadFromXmlPluginPackageDefinitions(this, ul, in);
                    in.close();

                } catch (Exception e) {
                    LOG.error("Skipping plugin package contained in file '{}' because of the following error : {}",
                            new String[] { file.getName(), e.getMessage() }, e);
                } finally {
                    try {
                        jarFile.close();
                    } catch (Exception e) {
                        // Intentionally ignored...
                        LOG.warn("An error has occurred closing jar file '{}'",file.getName(), e);
                    }
                }
            }

        } finally {
            streamMgr.closeAll();
        }
    }