Returns directory containing server output directories. A server output
directory has server's name as a name and located under this directory.

@return instance of the output directory or 'null' if installation directory
can't be determined.
351381
public static File getOutputDir(boolean isClient) {

        String outputDirLoc = null;

        // 1st check in environment variable is set.  This is the normal case
        // when the server is started from the command line.
        if (outputDir.get() == null) {

            try {
                outputDirLoc = AccessController.doPrivileged(new java.security.PrivilegedExceptionAction<String>() {
                    @Override
                    public String run() throws Exception {
                        return System.getenv(BootstrapConstants.ENV_WLP_OUTPUT_DIR);
                    }
                });
            } catch (Exception ex) {
            }

            //outputDirLoc = System.getenv(BootstrapConstants.ENV_WLP_OUTPUT_DIR);
            File resultDir = null;
            if (outputDirLoc != null) {
                resultDir = new File(outputDirLoc);
            } else {
                // PI20344: Check if the Java property is set, which is the normal case when
                // the server is embedded; i.e. they didn't launch it from the command line.
                outputDirLoc = System.getProperty(BootstrapConstants.ENV_WLP_OUTPUT_DIR);
                if (outputDirLoc != null) {
                    resultDir = new File(outputDirLoc);
                } else {
                    File userDir = Utils.getUserDir();
                    if (userDir != null) {
                        if (isClient) {
                            resultDir = new File(userDir, "clients");
                        } else {
                            resultDir = new File(userDir, "servers");
                        }
                    }
                }
            }
            outputDir = StaticValue.mutateStaticValue(outputDir, new FileInitializer(resultDir));
        }
        return outputDir.get();
    }
459870
public java.util.List<String> getSharedDirectoryIds() {
        if (sharedDirectoryIds == null) {
            sharedDirectoryIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return sharedDirectoryIds;
    }
738886
public static String getDockerItDir() {
        final String dockerItDir = targetDir().getAbsolutePath() + "/docker-it/";
        final File dir = new File(dockerItDir);
        dir.mkdirs();
        return dockerItDir;
    }
253255
public InetSocketAddress getNextDirectoryServer(){

        index = index + 1;
        if(index == servers.size()){
            index = 0;
        }
        InetSocketAddress unresolved = servers.get(index);

//        List<InetSocketAddress> resolved = null;
//        try {
//            InetAddress[] addresses = InetAddress.getAllByName(unresolved.getHostName());
//            for(InetAddress address : addresses){
//                if(resolved == null){
//                    resolved = new ArrayList<InetSocketAddress>();
//                }
//                resolved.add(new InetSocketAddress(address.getHostAddress(), unresolved.getPort()));
//            }
//        } catch (UnknownHostException e) {
//            LOGGER.error("Resolve the Directory Server failed, host=" + unresolved.getAddress().toString() + " - " + e.getMessage());
//        }
//
//        if(resolved == null){
//            return Collections.emptyList();
//        }
        return new InetSocketAddress(unresolved.getHostName(), unresolved.getPort());
    }
1192410
public String getAppServerDefaultDeploymentDir() throws Exception {
        final String[] addressArr = { SUBSYSTEM, DEPLOYMENT_SCANNER, SCANNER, "default" };
        final Address address = Address.root().add(addressArr);
        final ModelNode resourceAttributes = readResource(address);

        if (resourceAttributes == null) {
            return null; // there is no default scanner
        }

        final String path = resourceAttributes.get("path").asString();
        String relativeTo = null;
        if (resourceAttributes.hasDefined("relative-to")) {
            relativeTo = resourceAttributes.get("relative-to").asString();
        }

        // path = the actual filesystem path to be scanned. Treated as an absolute path,
        //        unless 'relative-to' is specified, in which case value is treated as relative to that path.
        // relative-to = Reference to a filesystem path defined in the "paths" section of the server
        //               configuration, or one of the system properties specified on startup.
        //               NOTE: here we will assume that if specified, it is a system property name.

        if (relativeTo != null) {
            String syspropValue = System.getProperty(relativeTo);
            if (syspropValue == null) {
                throw new IllegalStateException("Cannot support relative-to that isn't a sysprop: " + relativeTo);
            }
            relativeTo = syspropValue;
        }

        final File dir = new File(relativeTo, path);
        return dir.getAbsolutePath();
    }
303649
public Processor setOutputDir(final URI output) {
        if (!output.isAbsolute()) {
            throw new IllegalArgumentException("Output directory URI must be absolute: " + output);
        }
        if (!output.getScheme().equals("file")) {
            throw new IllegalArgumentException("Only file scheme allowed as output directory URI: " + output);
        }
        args.put("output.dir", output.toString());
        return this;
    }
536155
def create_output_directory(cls, outdir):
        """"""
        cls.PATH = outdir
        try:
            os.mkdir(outdir)
        except FileExistsError:
            pass
939189
public java.util.List<SharedDirectory> getSharedDirectories() {
        if (sharedDirectories == null) {
            sharedDirectories = new com.amazonaws.internal.SdkInternalList<SharedDirectory>();
        }
        return sharedDirectories;
    }
497042
static File getOutputDirectory(MavenProject rootModule) {
        String directoryName = rootModule.getBuild().getDirectory() + "/" + OUTPUT_DIRECTORY;
        File directory = new File(directoryName);
        directory.mkdirs();
        return directory;
    }
747269
function getOutputDir() {
	const outputOptionIdx = process.argv.indexOf('-o') !== -1 ? process.argv.indexOf('-o') : process.argv.indexOf('--output-file'),
		argsLength = process.argv.length,
		outputDirOption = '--outputDirectory=';

	if (process.argv[1].includes('grunt')) {
		for (var i = 2; i < argsLength; i++) {
			if (process.argv[i].includes(outputDirOption)) {
				return `/${process.argv[i].replace(outputDirOption, '')}`;
			}
		}
		return '/reports/'; // defaults to a reports folder if nothing else is found
	} else if (outputOptionIdx !== -1) {
		return `/${process.argv[outputOptionIdx + 1].split('/')[0]}/`;
	}

	return '';
}
1130151
@Override
    public File getServerLogDirectory() {
        String logLocation = TrConfigurator.getLogLocation();
        if (logLocation != null) {
            return new File(logLocation);
        } else {
            return null;
        }
    }
863963
public Processor setOutputDir(final File output) {
        if (!output.isAbsolute()) {
            throw new IllegalArgumentException("Output directory path must be absolute: " + output);
        }
        if (output.exists() && !output.isDirectory()) {
            throw new IllegalArgumentException("Output directory exists and is not a directory: " + output);
        }
        args.put("output.dir", output.getAbsolutePath());
        return this;
    }
1299893
public static Directory getDirectory()
        throws EFapsException
    {
        IDirectoryProvider provider = null;
        if (EFapsSystemConfiguration.get().containsAttributeValue(KernelSettings.INDEXDIRECTORYPROVCLASS)) {
            final String clazzname = EFapsSystemConfiguration.get().getAttributeValue(
                            KernelSettings.INDEXDIRECTORYPROVCLASS);
            try {
                final Class<?> clazz = Class.forName(clazzname, false, EFapsClassLoader.getInstance());
                provider = (IDirectoryProvider) clazz.newInstance();
            } catch (final ClassNotFoundException | InstantiationException | IllegalAccessException e) {
                throw new EFapsException(Index.class, "Could not instanciate IDirectoryProvider", e);
            }
        } else {
            provider = new IDirectoryProvider()
            {
                @Override
                public Directory getDirectory()
                    throws EFapsException
                {
                    return new RAMDirectory();
                }

                @Override
                public Directory getTaxonomyDirectory()
                    throws EFapsException
                {
                    return null;
                }
            };
        }
        return provider.getDirectory();
    }
615410
public static function getOutputDirectory($default = null)
    {
        $check = is_dir($default);
        $default = $check ? $default : H::parseDirName(C::DEFAULT_OUTPUT_DIR);

        return self::get(C::OUTPUT_DIR, realpath($default));
    }
1220362
public static String getUriWithOutputDir(DocumentURI key, String outputDir){
        String uri = key.getUri();
        if (outputDir != null && !outputDir.isEmpty()) {
            uri = outputDir.endsWith("/") || uri.startsWith("/") ? 
                  outputDir + uri : outputDir + '/' + uri;
            key.setUri(uri);
            key.validate();
        }    
        return uri;
    }
17631
public File getWisdomRootDirectory() {
        File wisdom;
        if (wisdomDirectory == null) {
            wisdom = new File(buildDirectory, Constants.WISDOM_DIRECTORY_NAME);
        } else {
            this.getLog().debug("Using Wisdom Directory : " + wisdomDirectory.getAbsolutePath());
            wisdom = wisdomDirectory;
        }

        if (wisdom.mkdirs()) {
            this.getLog().debug(wisdom.getAbsolutePath() + " directory created.");
        }
        return wisdom;
    }
947977
protected List<String> getClasspathDirectories()
    {
        return Arrays.asList( project.getBuild().getOutputDirectory(),
            project.getBuild().getTestOutputDirectory() );
    }