application/Espo/Core/Utils/File/Manager.php
public function getDirName($path, $isFullPath = true, $useIsDir = true)
    {
        $dirName = preg_replace('/\/$/i', '', $path);
        $dirName = ($useIsDir && is_dir($dirName)) ? $dirName : pathinfo($dirName, PATHINFO_DIRNAME);

        if (!$isFullPath) {
            $pieces = explode('/', $dirName);
            $dirName = $pieces[count($pieces)-1];
        }

        return $dirName;
    }
public function getDirName($path, $isFullPath = true, $useIsDir = true)
    {
        $dirName = preg_replace('/\/$/i', '', $path);
        $dirName = ($useIsDir && is_dir($dirName)) ? $dirName : pathinfo($dirName, PATHINFO_DIRNAME);

        if (!$isFullPath) {
            $pieces = explode('/', $dirName);
            $dirName = $pieces[count($pieces)-1];
        }

        return $dirName;
    }
public function getDirName ( $ path , $ isFullPath = true , $ useIsDir = true ) { $ dirName = preg_replace ( '/\/$/i' , '' , $ path ) ; $ dirName = ( $ useIsDir && is_dir ( $ dirName ) ) ? $ dirName : pathinfo ( $ dirName , PATHINFO_DIRNAME ) ; if ( ! $ isFullPath ) { $ pieces = explode ( '/' , $ dirName ) ; $ dirName = $ pieces [ count ( $ pieces ) - 1 ] ; } return $ dirName ; }
Get a directory name from the path

@param string $path
@param bool $isFullPath

@return array
Get a directory name from the path