Gets the project directory.

@param currentDir
the current dir
@return the project directory
178104
public static File getProjectDirectory(final File currentDir)
	{
		final String projectPath = PathFinder.getAbsolutePath(currentDir, true);
		final File projectFile = new File(projectPath);
		return projectFile;
	}
247921
public File getParentDirectory() {
        if (this.parentDirectory == null) {
            // the conventions are:
            // 1. jar in the function's method folder or
            // 2. in the function method's parent folder where all the method directories are children

            if (isJarInMethodFolder()) { 
                this.parentDirectory = getJarDirectory().getAbsoluteFile().getParentFile(); //up one level
            }
            this.parentDirectory = this.jarDirectory.getAbsoluteFile(); // otherwise convention #2
        }
        return this.parentDirectory;
    }
436385
private ProjectFile handleFileInDirectory(File directory) throws Exception
   {
      List<File> directories = new ArrayList<File>();
      File[] files = directory.listFiles();

      if (files != null)
      {
         // Try files first
         for (File file : files)
         {
            if (file.isDirectory())
            {
               directories.add(file);
            }
            else
            {
               UniversalProjectReader reader = new UniversalProjectReader();
               ProjectFile result = reader.read(file);
               if (result != null)
               {
                  return result;
               }
            }
         }

         // Haven't found a file we can read? Try the directories.
         for (File file : directories)
         {
            ProjectFile result = handleDirectory(file);
            if (result != null)
            {
               return result;
            }
         }
      }
      return null;
   }
1030698
public function getCurrentProject() {
    return $this->createInstance($this->environment->getProjectType(), $this->environment, $this->configuration, $this->fileSystem);
  }
1051001
public File getConfigDirectory() {
        String dirName = getConfigDir();
        File answer = null;
        if (Strings.isNotBlank(dirName)) {
            answer = new File(dirName);
        } else {
            answer = new File(".hawtio");
        }
        answer.mkdirs();
        return answer;
    }
968608
private synchronized File getWorkingDirectory() {
    if (workingDirectory == null) {
      try {
        workingDirectory =
            Files.createTempDirectory(TEMP_DIRECTORY_PREFIX).toFile();
      } catch (IOException e) {
        throw new UnexpectedException(e);
      }
    }
    return workingDirectory;
  }
1273741
public File getCorePlatformDir() {
        File platformDir = null;
        File installDir = Utils.getInstallDir();

        if (installDir != null) {
            platformDir = new File(installDir, PLATFORM_DIR);
        }

        if (platformDir == null) {
            throw new RuntimeException("Platform Directory not found");
        }

        return platformDir;
    }
1011499
public FilePath getCurrentWorkspace() {
        lock.readLock().lock();
        try {
            if (executable == null) {
                return null;
            }
            if (executable instanceof AbstractBuild) {
                AbstractBuild ab = (AbstractBuild) executable;
                return ab.getWorkspace();
            }
            return null;
        } finally {
            lock.readLock().unlock();
        }
    }
79492
protected String computeCurrentFolder() {

        String currentFolder = getSettings().getExplorerResource();
        if (currentFolder == null) {
            // set current folder to root folder
            try {
                currentFolder = getCms().getSitePath(getCms().readFolder("/", CmsResourceFilter.IGNORE_EXPIRATION));
            } catch (CmsException e) {
                // can usually be ignored
                if (LOG.isInfoEnabled()) {
                    LOG.info(e);
                }
                currentFolder = "/";
            }
        }
        if (!currentFolder.endsWith("/")) {
            // add folder separator to currentFolder
            currentFolder += "/";
        }
        return currentFolder;
    }
40408
public function getDirectory()
    {
        $dir = new Directory($this->getDirname());

        $namespaces = explode('\\', $this->getNameSpace());
        array_pop($namespaces);
        $dir->setNamespace(join('\\', $namespaces));

        return $dir;
    }
533955
public Optional<File> getLibDirectory() {
        File[] directories = getParentDirectory().listFiles(new FileFilter() {
            @Override
            public boolean accept(File file) {
                return file.isDirectory() && file.getName().endsWith("lib");
            }
        });
        if (directories.length == 0 || directories[0] == null) {
            return Optional.empty();
        }
        return Optional.ofNullable(directories[0].getAbsoluteFile());
    }
1309290
public function getDirectory() : ?string 
    {
        if ( ! $this->hasDirectory()) {
            $this->setDirectory($this->getDefaultDirectory());
        }
        return $this->directory;
    }
832910
static File getAppFolder(final File baseDirectory, final String configuration, final String sdk)
  {
    return new File(getBuildDir(baseDirectory), configuration + "-" + sdk);
  }
580512
protected String getCurrentFolderPath(GenericWebAppContext context)
   {
      // To limit browsing set Servlet init param "digitalAssetsPath" with desired JCR path
      String rootFolderStr =
         (String)context.get("org.exoplatform.frameworks.jcr.command.web.fckeditor.digitalAssetsPath");

      if (rootFolderStr == null)
         rootFolderStr = "/";

      // set current folder
      String currentFolderStr = (String)context.get("CurrentFolder");
      if (currentFolderStr == null)
         currentFolderStr = "";
      else if (currentFolderStr.length() < rootFolderStr.length())
         currentFolderStr = rootFolderStr;

      return currentFolderStr;
   }
761152
def relworkdir(self):
        """"""
        if getattr(self, "workdir", None) is None:
            return None
        try:
            return os.path.relpath(self.workdir)
        except OSError:
            # current working directory may not be defined!
            return self.workdir
1322275
public CPath getCPath()
    {
        if ( parent == null ) {
            return CPath.ROOT;
        }

        CMFolder currentFolder = this;
        StringBuilder path = new StringBuilder(  );

        while ( currentFolder.parent != null ) {
            path.insert( 0, currentFolder.name );
            path.insert( 0, '/' );

            currentFolder = currentFolder.parent;
        }

        return new CPath( path.toString() );
    }
697007
String getDocumentationDir() {
        String baseDir = project.getBuild().getDirectory();
        if (baseDir == null || new File(baseDir).exists()) {
            baseDir = project.getBasedir().getAbsolutePath();
            baseDir = baseDir + "/target";
            if (!new File(baseDir).exists()) {
                //maven plugin declared in child module
                baseDir = project.getBasedir().getAbsolutePath();
            }
        }
        if (!baseDir.endsWith("/")) {
            baseDir = baseDir + "/";
        }

        if (outputDir == null) {
            outputDir = "cukedoctor/";
        }

        if (!outputDir.endsWith("/")) {
            outputDir = outputDir + "/";
        }

        return baseDir + outputDir;

    }