Get App Folders
@param input path to join to destination path
@param deploymentApplicationType type of application being composed
@returns {Array} array of string representing app folders
506739
function getAppFolders(input, deploymentApplicationType) {
    const destinationPath = this.destinationPath(input);
    const files = shelljs.ls('-l', destinationPath);
    const appsFolders = [];

    files.forEach(file => {
        if (file.isDirectory()) {
            if (shelljs.test('-f', `${destinationPath}/${file.name}/.yo-rc.json`)) {
                try {
                    const fileData = this.fs.readJSON(`${destinationPath}/${file.name}/.yo-rc.json`);
                    if (
                        fileData['generator-jhipster'].baseName !== undefined &&
                        (deploymentApplicationType === undefined ||
                            deploymentApplicationType === fileData['generator-jhipster'].applicationType ||
                            (deploymentApplicationType === 'microservice' &&
                                fileData['generator-jhipster'].applicationType === 'gateway') ||
                            (deploymentApplicationType === 'microservice' && fileData['generator-jhipster'].applicationType === 'uaa'))
                    ) {
                        appsFolders.push(file.name.match(/([^/]*)\/*$/)[1]);
                    }
                } catch (err) {
                    this.log(chalk.red(`${file}: this .yo-rc.json can't be read`));
                    this.debug('Error:', err);
                }
            }
        }
    });

    return appsFolders;
}
976869
function getApplications() {
    var namespaces = Ember.A(Ember.Namespace.NAMESPACES);

    var apps = namespaces.filter(function(namespace) {
      return namespace instanceof Ember.Application;
    });

    return apps.map(function(app) {
      // Add applicationId and applicationName to the app
      var applicationId = Ember.guidFor(app);
      var applicationName = app.name || app.modulePrefix || `(unknown app - ${applicationId})`;

      Object.assign(app, {
        applicationId,
        applicationName
      });

      return app;
    });
  }
291608
private List<I_CmsFolderAppCategory> loadAppFolder() {

        List<I_CmsFolderAppCategory> result = new ArrayList<I_CmsFolderAppCategory>();
        result.addAll(
            Arrays.<I_CmsFolderAppCategory> asList(
                new CmsLinkValidationFolder(),
                new CmsFileHistoryFolder(),
                new CmsDbManagerFolder(),
                new CmsCacheFolder()));
        return result;
    }
622298
function askTypeOfApplication() {
    if (this.abort) return null;
    const done = this.async();

    const prompts = [
        {
            type: 'list',
            name: 'applicationType',
            message: 'Which *type* of application would you like to deploy?',
            choices: [
                {
                    value: 'monolith',
                    name: 'Monolithic application'
                },
                {
                    value: 'microservice',
                    name: 'Microservice application'
                }
            ],
            default: 'monolith'
        }
    ];

    return this.prompt(prompts).then(props => {
        const applicationType = props.applicationType;
        this.deploymentApplicationType = props.applicationType;
        if (applicationType) {
            this.log(applicationType);
            done();
        } else {
            this.abort = true;
            done();
        }
    });
}
731002
function getPaths(path) {
        var appPath = path;
        if (/dev\/temp\.ts$/.test(path)) // hack used when debugging.
            appPath = 'pargv';
        var appName = path_1.basename(appPath); // get the basename from path.
        var completionsDir = path_1.join(env.HOME_PATH, "." + appName);
        if (/\.(ts|js)$/.test(appPath)) {
            appPath = "./" + appPath; // not installed as bin.
            var parsedPath = path_1.parse(appPath);
            completionsDir = parsedPath.dir; // store completions.sh at executable file path.
        }
        var bashPath = !/^win/.test(env.PLATFORM) ? /^darwin/.test(env.PLATFORM) ? '.bash_profile' : '.bashrc' : false;
        if (bashPath)
            bashPath = path_1.join(env.HOME_PATH, bashPath);
        var completionsPath = path_1.join(completionsDir, 'completions.sh');
        return {
            appName: appName,
            appPath: appPath,
            bashPath: bashPath,
            completionsDir: completionsDir,
            completionsPath: completionsPath // the completions path.
        };
    }
832910
static File getAppFolder(final File baseDirectory, final String configuration, final String sdk)
  {
    return new File(getBuildDir(baseDirectory), configuration + "-" + sdk);
  }
251080
public void deployApplication(String applicationName, URL... urls) throws IOException {
        this.applicationName = applicationName;

        for (URL url : urls) {
            try (InputStream inputStream = url.openStream()) {
                deploy(inputStream);
            }
        }
    }
444637
@Override
  public Map<String, DeploymentGroup> getDeploymentGroups() {
    log.debug("getting deployment groups");
    final String folder = Paths.configDeploymentGroups();
    final ZooKeeperClient client = provider.get("getDeploymentGroups");
    try {
      final List<String> names;
      try {
        names = client.getChildren(folder);
      } catch (NoNodeException e) {
        return Maps.newHashMap();
      }
      final Map<String, DeploymentGroup> descriptors = Maps.newHashMap();
      for (final String name : names) {
        final String path = Paths.configDeploymentGroup(name);
        try {
          final byte[] data = client.getData(path);
          final DeploymentGroup descriptor = parse(data, DeploymentGroup.class);
          descriptors.put(descriptor.getName(), descriptor);
        } catch (NoNodeException e) {
          // Ignore, the deployment group was deleted before we had a chance to read it.
          log.debug("Ignoring deleted deployment group {}", name);
        }
      }
      return descriptors;
    } catch (KeeperException | IOException e) {
      throw new HeliosRuntimeException("getting deployment groups failed", e);
    }
  }
909869
public byte[] getApplicationData() {
        return this.applicationData == null || this.applicationData.length == 0
                ? null
                : Arrays.copyOf(this.applicationData, this.applicationData.length);
    }
152972
public JobFolder createJobFolderWithApplicationId(final String applicationId) throws IOException {
    final Path jobFolderPath = jobSubmissionDirectoryProvider.getJobSubmissionDirectoryPath(applicationId);
    final String finalJobFolderPath = jobFolderPath.toString();
    LOG.log(Level.FINE, "Final job submission Directory: " + finalJobFolderPath);
    return createJobFolder(finalJobFolderPath);
  }
473527
function setAppsFolderPaths() {
    if (this.applicationType) return;
    this.appsFolderPaths = [];
    for (let i = 0; i < this.appsFolders.length; i++) {
        const path = this.destinationPath(this.directoryPath + this.appsFolders[i]);
        this.appsFolderPaths.push(path);
    }
}
461589
func (c *Client) GetApplications() ([]Application, error) {
	var appMap map[string]Application
	if err := c.get(`app/list`, &appMap); err != nil {
		return nil, err
	}

	var appList []Application
	for _, app := range appMap {
		appList = append(appList, app)
	}
	sort.Sort(applications(appList))
	return appList, nil
}
443847
public static function getApplicationDirPath():?MApplicationDir
    {
        if (self::isCliApp()) {
            return self::$APPLICATION_DIR_PATH;
        }

        return MSession::get(MCoreApplication::APPLICATION_DIR_PATH);
    }
1049740
function(project, relativeFilePath, appPath){
			var deferred = new Deferred();
			var self = this;

			if(project.ContentLocation === relativeFilePath){
				/* use the project root as deployment path */
				deferred.resolve({
					path: relativeFilePath,
					appPath: appPath
				});

				return deferred;
			}

			/* use the project as deployment path */
			deferred.resolve({
				path: relativeFilePath,
				appPath: appPath || "" /* Note that the appPath has to be updated as well */
			});

			return deferred;
		}
588468
function writeApplicationFileForMultipleApplications(application) {
  const applicationBaseName = application[GENERATOR_NAME].baseName;
  checkPath(applicationBaseName);
  createFolderIfNeeded(applicationBaseName);
  writeConfigFile(application, path.join(applicationBaseName, '.yo-rc.json'));
}
607268
protected function determineWorkingDirectoryAndTargetNode(Node $node, Application $application, Deployment $deployment, array $options = [])
    {
        if (!isset($this->workingDirectory, $this->targetNode)) {
            if (isset($options['useApplicationWorkspace']) && $options['useApplicationWorkspace'] === true) {
                $this->workingDirectory = $deployment->getWorkspacePath($application);
                $node = $deployment->getNode('localhost');
            } else {
                $this->workingDirectory = $deployment->getApplicationReleasePath($application);
            }
            $this->targetNode = $node;
        }
    }
962709
private static String lookupStorageServiceByApp(RESTClient restClient, String applicationName) {
        Utils.require(applicationName != null, "Missing application name");
        if (applicationName != null) {
            ApplicationDefinition appDef =  Command.getAppDef(restClient, applicationName);
            Utils.require(appDef != null, "Unknown application: %s", applicationName);
            return appDef.getStorageService();
        }
        return null;
    }