retur folder about aplicatoins
320147
private function getApplicationPathFiles(){

		$this->setPathURI(explode('/', preg_replace('/^[\/]*(.*?)[\/]*$/', '\\1', $_SERVER['REQUEST_URI'])));
		$a=$this->getPathURI();


		if($this->getEnvironmentStatus()=='development'){
			$nun_level=explode("/", $this->getAddressUri());

			for ($i=0; $i < count($nun_level)-2; $i++) {
				array_shift($a);
			}
			$this->setPathURI($a);
		}
		foreach ($a as $key => $value) {
			if($this->getNameApplication()==$value){
				unset($a[$key]);
			}
		}

		if(reset($a)=='helpers'){
			array_shift($a);
			$helpers=true;
		}else{
			$helpers=false;
		}
		$this->setPathURI($a);

		foreach ($a as $key => $value) {
			$this->posURL[]=$value;
		}


		$url_array=$this->getPathURI();

		$directory_action=$directory_ctrl=$directory_view='';

		if($helpers==true){

			$directory_action = $this->getPathApplication().'helpers';

			do{
				if( in_array(current($url_array), scandir($directory_action))){
					$directory_action.='/'.current($url_array);
					next($url_array);
					$dir = false;
					if(isset($url_array[key($url_array)+1])){
						$this->setMethodsURI($url_array[key($url_array)+1]);
					}
				}else if( in_array(current($url_array).'.php', scandir($directory_action))){
					$directory_action.='/'.current($url_array).'.php';
					next($url_array);
					$dir = true;
				}else{
					$directory_action.='/index.php';
					$dir = true;
				}
			}while(!$dir);
		}else{
			$directory_ctrl = $this->getPathApplication().'controllers';
			$directory_view = $this->getPathApplication().'views/pages';
			$this->urlCompletePath = substr($this->getPathBaseHref(),0,-1);
			do{
				if( (file_exists($directory_view) && in_array(current($url_array), scandir($directory_view))) || (file_exists($directory_ctrl) && in_array(current($url_array), scandir($directory_ctrl))) ){
					$directory_ctrl.='/'.current($url_array);
					$directory_view.='/'.current($url_array);
					$this->urlCompletePath.='/'.(current($url_array)!='index'?current($url_array):'');
					next($url_array);
					$dir = false;
					if(isset($url_array[key($url_array)])){
						$this->setMethodsURI($url_array[key($url_array)]);
					}
				}else if( (file_exists($directory_view) && in_array(current($url_array).'.php', scandir($directory_view))) || (file_exists($directory_ctrl) && in_array(current($url_array).'.php', scandir($directory_ctrl))) ){
					$directory_ctrl.='/'.current($url_array).'.php';
					$directory_view.='/'.current($url_array).'.php';
					$this->urlCompletePath.='/'.(current($url_array)!='index'?current($url_array):'');
					next($url_array);
					if(isset($url_array[key($url_array)])){
						$this->setMethodsURI($url_array[key($url_array)]);
					}
					$dir = true;
				}else{
					if(isset($url_array[key($url_array)])){
						$this->setMethodsURI($url_array[key($url_array)]);
					}

					if((count($url_array)==0 || is_int(key($url_array)) == false) || (isset($url_array) && $url_array[0]=='')){
						$directory_ctrl.='/index.php';
						$directory_view.='/index.php';
						$this->urlCompletePath.='/';
					}
					$dir = true;
				}

			}while(!$dir);
		}

		//verifica se existe a view
		if($helpers==true && file_exists($directory_action) && is_file($directory_action) ){
			// inicia actoin
			$this->setPageAction($directory_action);
			$this->instanceTemplate($this->getPageAction());
			if (strpos($_SERVER['HTTP_ACCEPT'], 'htm') === false) {
			}else{
				$helpers=false;
				$this->setPageView($this->getPathApplication('views/error/','404.php'));
			}
		}else if((file_exists($directory_ctrl) && is_file($directory_ctrl)) || (file_exists($directory_view) && is_file($directory_view))){
			// inicia controller
			$this->setPageCtrl($directory_ctrl);
			$this->setPageView($directory_view);
		}
		if(!file_exists($directory_ctrl) || !is_file($directory_ctrl)){
			$this->setPageCtrl($this->getPathApplication('controllers/error/','404.php'));
		}
		if(!file_exists($directory_view) || !is_file($directory_view)){
			$this->setPageView($this->getPathApplication('views/error/','404.php'));
		}

		if($helpers==false){
			$this->instanceTemplate($this->getPathApplication('views/layout/','template.php'));
		}

	}
797596
def getWorkDirs():
  """"""
  # get caller module
  caller_fullurl = inspect.stack()[1][1]
  caller_relurl = os.path.relpath(caller_fullurl)
  caller_modurl = os.path.splitext(caller_relurl)[0]
  # split caller_url & append 'Dir' to package name
  dirs = caller_modurl.split('/')
  dirs[0] = 'data' # TODO de-hardcode
  # get, check and create outdir
  outDir = os.path.join(*(['output'] + dirs[1:]))
  if not os.path.exists(outDir): os.makedirs(outDir)
  # get and check indir
  dirs.append('input')
  inDir = os.path.join(*dirs)
  if not os.path.exists(inDir):
    logging.critical('create input dir %s to continue!' % inDir)
    sys.exit(1)
  return inDir, outDir
1293027
def get_path_directories():
    
    pth = os.environ['PATH']
    if sys.platform == 'win32' and os.environ.get("BASH"):
        # winbash has a bug..
        if pth[1] == ';':  # pragma: nocover
            pth = pth.replace(';', ':', 1)
    return [p.strip() for p in pth.split(os.pathsep) if p.strip()]
1204921
def _support_directory():
    """"""
    from os.path import join, dirname, abspath
    return join(dirname(abspath(__file__)), 'support_files')
900424
def dir():
        
        dir = [
            'abspath', 'dirname', 'exists', 'expanduser', 'getatime',
            'getctime', 'getmtime', 'getsize', 'isabs', 'isdir', 'isfile',
            'islink', 'ismount', 'join', 'lexists', 'normcase', 'normpath',
            'realpath', 'relpath', 'split', 'splitdrive'
        ]
        if IS_PY2:
            dir.append('walk')
        if sys.platform != 'win32' or not IS_PY2:
            dir.append('samefile')
        return dir
1019754
def _candidate_tempdir_list():
    """"""

    dirlist = []

    # First, try the environment.
    for envname in 'TMPDIR', 'TEMP', 'TMP':
        dirname = _os.getenv(envname)
        if dirname: dirlist.append(dirname)

    # Failing that, try OS-specific locations.
    if _os.name == 'nt':
        dirlist.extend([ r'c:\temp', r'c:\tmp', r'\temp', r'\tmp' ])
    else:
        dirlist.extend([ '/tmp', '/var/tmp', '/usr/tmp' ])

    # As a last resort, the current directory.
    try:
        dirlist.append(_os.getcwd())
    except (AttributeError, OSError):
        dirlist.append(_os.curdir)

    return dirlist
1218637
def include_dir(self, root):
        """"""
        parts = [root]
        parts.extend(self.pathname.split(os.path.sep))
        return "/".join(parts)
1363964
def setup_chmod(setup_fpath, setup_dir, chmod_patterns):
    
    #st_mode = os.stat(setup_fpath).st_mode
    st_mode = 33277
    for pattern in chmod_patterns:
        for fpath in util_path.glob(setup_dir, pattern, recursive=True):
            print('[setup] chmod fpath=%r' % fpath)
            os.chmod(fpath, st_mode)
330916
def get_profile_dir ():
    """"""
    if os.name == 'nt':
        basedir = unicode(os.environ["APPDATA"], nt_filename_encoding)
        dirpath = os.path.join(basedir, u"Mozilla", u"Firefox", u"Profiles")
    elif os.name == 'posix':
        basedir = unicode(os.environ["HOME"])
        dirpath = os.path.join(basedir, u".mozilla", u"firefox")
    return dirpath
1026923
def _get_template_dirs():
    """"""
    return filter(lambda x: os.path.exists(x), [
        # user dir
        os.path.join(os.path.expanduser('~'), '.py2pack', 'templates'),
        # system wide dir
        os.path.join('/', 'usr', 'share', 'py2pack', 'templates'),
        # usually inside the site-packages dir
        os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates'),
    ])
745169
def dirs(self):
        """"""
        contents = self.paths
        contents = (BinDir(path.path) for path in contents if path.is_dir)
        return contents
655411
def get_rlbot_directory() -> str:
    """"""
    return os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
1174480
function(relativePath) {
    const folder = setupHelper.setupFolderAbsolutePath() + '/' + relativePath;
    return setupHelper.handleShellResponse(shell.exec('rm -rf ' + folder));
  }
575945
def get_notebook_rel_path(pkg=None):
    """"""
    pkg = pkg or open_source_package()
    pkg_path = str(pkg.package_url.fspath)
    nb_path = get_notebook_path()

    return nb_path.replace(pkg_path, '').strip('/')
793998
def listdir(self, relpath):
    

    path = self._realpath(relpath)
    if not path.endswith('/'):
      raise self.NotADirException(self.rev, relpath)

    if path[0] == '/' or path.startswith('../'):
      return os.listdir(path)

    tree = self._read_tree(path[:-1])
    return list(tree.keys())
970054
def getReposPackageFolder():
	""""""
	libdir = sysconfig.get_python_lib()
	repodir = os.path.join(libdir, "calcrepo", "repos")
	return repodir
73724
def dirinfo(path, opts=None):
    '''
    
    '''
    cmd = 'mfsdirinfo'
    ret = {}
    if opts:
        cmd += ' -' + opts
    cmd += ' ' + path
    out = __salt__['cmd.run_all'](cmd, python_shell=False)

    output = out['stdout'].splitlines()
    for line in output:
        if not line:
            continue
        comps = line.split(':')
        ret[comps[0].strip()] = comps[1].strip()
    return ret