Returns the current working directory

@return Directory Current directory
347645
public function getCwd()
    {
        $path = $this->wrapper->pwd();

        if ('/' === $path) {
            return new Directory('/');
        }

        return $this->findDirectoryByName($path);
    }
107652
public function dir()
	{
		$dir = clone $this;
		if ($this->lastPart === '') {
			// already dir
		} else if ($this->lastPart === '..' || $this->lastPart === '.') {
			$dir->parts[] = '';
		} else {
			array_pop($dir->parts);
			$dir->parts[] = '';
		}
		$dir->setParts($dir->parts);
		return $dir;
	}
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;
  }
1249829
public String getCurrentDir() throws IOException, ServerException {
        Reply reply = null;
        try {
            reply = controlChannel.execute(Command.PWD);
        } catch (FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        } catch (UnexpectedReplyCodeException urce) {
            throw ServerException.embedUnexpectedReplyCodeException(
                                urce,
                                "Server refused returning current directory");
        }
        String strReply = reply.getMessage();
        if (strReply.length() > 0 && strReply.charAt(0) == '"') {
            return strReply.substring(1, strReply.indexOf('"', 1));
        } else {
            throw ServerException.embedFTPReplyParseException(
                                new FTPReplyParseException(
                                        0,
                                        "Cannot parse 'PWD' reply: " + reply));
        }
    }
1024041
private function _directory()
    {
        if ($this->isSFTP()) {
            // == DIRECTORY_SEPARATOR ? '' : $pwd;
            $pwd = @$this->ftp->pwd();
        } else {
            $pwd = @ftp_pwd($this->ftp);
        }
        if (!$pwd) {
            $this->fail("couldn't get current directory");
        }
    }
483206
public function getTemporaryDirectory()
    {
        if (!self::$_temporary_directory)
        {
            $result     = false;
            $candidates = array(
                ini_get('upload_tmp_dir'),
                JFactory::getApplication()->getCfg('tmp_path'),
                JPATH_ROOT.'/tmp'
            );

            if (function_exists('sys_get_temp_dir')) {
                array_unshift($candidates, sys_get_temp_dir());
            }

            foreach ($candidates as $folder)
            {
                if ($folder && @is_dir($folder) && is_writable($folder))
                {
                    $result = rtrim($folder, '\\/');
                    break;
                }
            }

            if ($result === false) {
                throw new RuntimeException('Cannot find a writable temporary directory');
            }

            self::$_temporary_directory = $result;
        }

        return self::$_temporary_directory;
    }
682939
protected function _getPaths()
    {
        $directories = $this->_createDirectoryIterator($this->_getRootDir());
        $flattened   = $this->_createRecursiveIteratorIterator($directories);
        $flattened->setMaxDepth($this->_getMaxDepth());
        $filter = $this->_createFilterIterator($flattened, function (SplFileInfo $current, $key, Iterator $iterator) {
            return $this->_filterFile($current);
        });

        return $filter;
    }
1253804
public function getRootDirectory()
    {
        if(isset($this->rootDirectory) == false) {
            $this->rootDirectory = $this->locateRootDirectory();
        }
        return $this->rootDirectory;
    }
150255
public function getFilepath()
    {
        if (isset($this->dirPath)) {
            $filepath = $this->dirPath .'/'.$this->filename;
        } else {
            $fileSystem = $this->createNew(FileSystem::class);
            $filepath   = $fileSystem->getCurrentWorkingDirectory() .'/'.$this->filename;    
        }
        return $filepath;        
    }
683969
public function getRootDir()
    {
        if (null === $this->rootDir) {
            $this->rootDir = realpath(getcwd() . '/app');
        }

        return $this->rootDir;
    }
191322
public function getBaseDir()
    {
        if (null === $this->baseDir) {
            $this->baseDir = dirname($this->getVendorDir());
        }

        return $this->baseDir;
    }
31188
public function getOtherDirectories()
    {
        $directories = array();
        foreach ($this->otherDirectories as $directory) {
            $directories[] = sprintf('%s/%s', $this->getHost()->getPath(), $directory);
        }

        return $directories;
    }
866233
public function getPath()
	{
		$path = getcwd() . DIRECTORY_SEPARATOR . $this->path;

		if (substr($this->path, 0, 1) == '/' || substr($this->path, 1, 1) == ':') {
			$path = $this->path;
		}

		return realpath($path);
	}
99952
protected function getDirname()
    {
        if (null === $this->dirname) {
            $r = new ReflectionObject($this);
            $this->dirname = dirname($r->getFileName());
        }

        return $this->dirname;
    }
872453
public function getCacheDirectory()
    {
        $dir = $this->cacheBaseDir.'/RatingServicesCache/';
        if (!file_exists($dir)) {
            mkdir($dir, 0777, true);
            if (!file_exists($dir)) {
                $dir = null;
            }
        }
        if (!is_dir($dir) || !is_writable($dir)) {
            $dir = null;
        }

        return $dir;
    }
535887
public function getDirectory()
    {
        if ($this->directory instanceof \Closure) {
            return call_user_func($this->directory, $this->form);
        }

        return $this->directory ?: $this->defaultDirectory();
    }
692020
public function getCurrentUploadDir()
    {
        if (! isset($this->currentUploadDir)) {
            $modelDir = $this->getIdentifier();
            $this->currentUploadDir = public_path($this->uploadDir).DIRECTORY_SEPARATOR.$modelDir.
                DIRECTORY_SEPARATOR.$this->getKey().DIRECTORY_SEPARATOR;
        }

        return $this->currentUploadDir;
    }