Returns the project name - currently assuming the last dirname in
 the SimpleCov.root is this.
358342
def project_name(new_name = nil)
      return @project_name if defined?(@project_name) && @project_name && new_name.nil?
      @project_name = new_name if new_name.is_a?(String)
      @project_name ||= File.basename(root.split("/").last).capitalize.tr("_", " ")
    end
803557
def get_current_project(self):
        

        try:
            command = self._oc_command(["project", "-q"])
            output = run_cmd(command, return_output=True)
        except subprocess.CalledProcessError as ex:
            raise ConuException("Failed to obtain current project name : %s" % ex)

        try:
            return output.rstrip()  # remove '\n'
        except IndexError:
            raise ConuException("Failed to obtain project name")
711811
protected function getProjectPath(): string
    {
        if (!$this->projectPath) {
            $cls = new \ReflectionClass(static::class);
            $baseDir = dirname($cls->getFileName());
            $this->projectPath = Path::makeAbsolute($this->PROJECT_DIR, $baseDir);
        }

        return $this->projectPath;
    }
952889
def get_path_name(self):
        
        complete_path = os.path.dirname(os.path.abspath(self.path))
        name = self.path.replace(complete_path + PATH_SEPARATOR, "")
        if name.endswith("/"):
            name = name[: -1]

        return complete_path, name
115917
def dirname(self, path):
        """"""
        if self.is_ssh(path):
            remotepath = self._get_remote(path)
            remotedir = os.path.dirname(remotepath)
            return self._get_tramp_path(remotedir)
        else:
            return os.path.dirname(path)
262986
def filename(self) -> str:
        
        if self._new_path is not None and str(self._new_path) != "/dev/null":
            path = self._new_path
        else:
            path = self._old_path

        return path.name
525038
def path(self):
        
        return "/projects/%s/managedZones/%s/changes/%s" % (
            self.zone.project,
            self.zone.name,
            self.name,
        )
872880
def full_name(self):
        """"""
        if self._full_name is None:
            self._full_name = 'projects/{project}/taskqueues/{taskqueue}'.format(project=self.project,
                                                                                 taskqueue=self.id)
        return self._full_name
612675
def full_name(self):
        
        if self._tree.parent is None:
            return self._intern.name
        return self._tree.parent.full_name() + '.' + self._intern.name
138918
function getRecentProjects() {
        var recentProjects = PreferencesManager.getViewState("recentProjects") || [],
            i;

        for (i = 0; i < recentProjects.length; i++) {
            // We have to canonicalize & then de-canonicalize the path here, since our pref format uses no trailing "/"
            recentProjects[i] = FileUtils.stripTrailingSlash(ProjectManager.updateWelcomeProjectPath(recentProjects[i] + "/"));
        }
        return recentProjects;
    }
310462
def path(self) -> str:
        """"""
        return os.path.join(self.project_path, self.project.name)
249080
def folder(self) -> typing.Union[str, None]:
        

        if 'folder' in self.data:
            return self.data.get('folder')
        elif self.project_folder:
            if callable(self.project_folder):
                return self.project_folder()
            else:
                return self.project_folder
        return None
804047
function() {
    const dir = path.join(this.project.root, 'app');
    let prefix = this.parent.isEmberCLIAddon() ? 'dummy' : this.parent.name();
    return this._getIncludesForDir(dir, prefix);
  }
1210153
private String getSiteRoot() {

        String res;

        if (m_simpleFieldSiteRoot.isVisible()) {
            res = m_simpleFieldSiteRoot.getValue();
        } else {
            res = "/" + ensureFoldername(getParentFolder()) + ensureFoldername(getFieldFolder());
            res = res.endsWith("/") ? res.substring(0, res.length() - 1) : res;
        }
        return res;
    }
1327816
public static function getProjectRootPath()
    {
        $projectRootPath = '';

        $fileName = 'composer.json';
        $directoryPath = __DIR__;

        // Path of directory it's not the path of last directory?
        while (DIRECTORY_SEPARATOR !== $directoryPath) {
            $filePath = static::concatenatePaths($directoryPath, $fileName);

            /*
             * Is here file we are looking for?
             * Maybe it's a project's root path
             */
            if (file_exists($filePath)) {
                $projectRootPath = $directoryPath;
            }

            $directoryPath = dirname($directoryPath);
        }

        return $projectRootPath;
    }
1003952
def dirname(path: Optional[str]) -> Optional[str]:
    
    if path is not None:
        return os.path.dirname(path)
316911
def Dirname(self):
    """"""
    result = self.Copy()

    while 1:
      last_directory = posixpath.dirname(result.last.path)
      if last_directory != "/" or len(result) <= 1:
        result.last.path = last_directory
        # Make sure to clear the inode information.
        result.last.inode = None

        break

      result.Pop(-1)

    return result