getSystemConfigDir
Get the system configuration directory.

@return string $systemConfigDir
776702
protected function getSystemConfigDir()
    {
        if (null === $this->systemConfigDir) {
            $reflector = new \ReflectionClass($this);
            $rootDir = dirname($reflector->getFileName());
            $this->systemConfigDir = $rootDir . '/Resources/config/';
        }

        return($this->systemConfigDir);
    }
348953
def get_system_config_directory():
    
    if platform.system().lower() == 'windows':
        _cfg_directory = Path(os.getenv('APPDATA') or '~')
    elif platform.system().lower() == 'darwin':
        _cfg_directory = Path('~', 'Library', 'Preferences')
    else:
        _cfg_directory = Path(os.getenv('XDG_CONFIG_HOME') or '~/.config')

    logger.debug('Fetching configt directory for {}.'
                 .format(platform.system()))
    return _cfg_directory.joinpath(Path('mayalauncher/.config'))
952646
public function getBinDir(): string
    {
        $binDir = $this->config->getBinDir();
        if (!$this->fileSystem->exists($binDir)) {
            throw new RuntimeException('The configured BIN directory could not be found.');
        }

        return $this->getRelativePath($binDir);
    }
630688
public static function getDirPath()
    {
        $dir = Composer::getComposerVendorDir().'/config';
        self::$dirPath = self::$dirPath === null ? $dir : self::$dirPath;
        self::$dirPath = str_replace('\\', '/', self::$dirPath);
        return self::$dirPath;
    }
1177947
public static function getSystemTemporaryDirectory()
    {
        $tempDir = @sys_get_temp_dir();
        if (is_string($tempDir)) {
            $tempDir = str_replace(DIRECTORY_SEPARATOR, '/', (string) $tempDir);
            if ($tempDir !== '/') {
                $tempDir = rtrim($tempDir, '/');
            }
        } else {
            $tempDir = '';
        }
        if ($tempDir === '' || !is_dir($tempDir)) {
            throw new Exception\PathNotFound($tempDir, 'Unable to detect the system temporary directory.');
        }

        return $tempDir;
    }
775305
def xdg_config_dir():
    '''
    
    '''
    xdg_config = os.getenv('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
    xdg_config_directory = os.path.join(xdg_config, 'salt')
    return xdg_config_directory
611877
protected function createConfigDirectory()
    {
        $this->displayMsgInCli(' >> Create config directory for this module ... ');
        
        $alreadyExist = file_exists($this->targetConfigPath);
        
        //If the directory already exist and if it's a reinstall
        if ($alreadyExist && $this->forceReinstall === true) {
            $this->displayMsgInCli('[Force Reinstall: Remove directory] ');
            
            $alreadyExist = false;
            if (!$this->removeRecursiveDirectory($this->targetConfigPath)) {
                $this->displayMsgNLInCli(
                    'Remove the module config directory have fail',
                    'red',
                    'bold'
                );
                
                throw new Exception(
                    'Reinstall fail. Remove module config directory error',
                    $this::ERR_REINSTALL_FAIL_REMOVE_CONFIG_DIR
                );
            }
        }
        
        //If the directory already exist, nothing to do
        if ($alreadyExist) {
            $this->displayMsgNLInCli('Already exist', 'yellow', 'bold');
            return;
        }
        
        //Create the directory
        if (!mkdir($this->targetConfigPath, 0755)) {
            $this->displayMsgNLInCli('Fail', 'red', 'bold');
            
            throw new Exception(
                'Error to create the config directory.',
                $this::ERR_FAIL_CREATE_CONFIG_DIR
            );
        }

        $this->displayMsgNLInCli('Done', 'green', 'bold');
    }
152819
protected function getPackageDir() {
		
		$baseDir    = realpath(getcwd()).DIRECTORY_SEPARATOR;
		$configDir  = (is_dir($baseDir."_config")) ? "_config" : "config";
		$configFile = $baseDir.$configDir.DIRECTORY_SEPARATOR."config.yml";
		
		if (file_exists($configFile)) {
			$configData = file_get_contents($configFile);
			preg_match("/packagesDir:([ ]+)?([\"'])?([A-z0-9-]{1,})([\"'])?([ ]+)?/",$configData,$matches);
			$packageDir = (isset($matches[3])) ? $matches[3] : "packages"; // provide an expected default just in case
		} else {
			$packageDir = "vendor";
		}
		
		return $packageDir;
		
	}
923501
private function getDirectoryPath()
    {
        $path = $this->config['directory'];

        // Create directory if not exists
        if (!is_dir($path)) {
            mkdir($path, 0755, true);
        }

        return $path . DIRECTORY_SEPARATOR;
    }
873373
public function getRootDirectory()
    {
        $config = $this->composer->getConfig();
        
        return str_replace($config->get('vendor-dir', Config::RELATIVE_PATHS), '', $config->get('vendor-dir'));
    }
364417
private static function findDirectories(): string
    {
        if ($value = trim((string) self::getEnvVariable(self::CONFIG_PATH))) {
            // add env config path to top of possible locations.
            array_unshift(self::$possibleLocations, $value);
        }

        foreach (self::$possibleLocations as $path) {
            if (($location = realpath($path)) !== false) {
                return $location;
            }
        }

        throw new LogicException(sprintf(
            'Configuration directory not found in known path\'s: %s',
            join(',', self::$possibleLocations)
        ));
    }
478838
public static function cacheDirectory()
    {
        $ini = eZINI::instance();
        $cacheDir = $ini->variable( 'FileSettings', 'CacheDir' );

        if ( $cacheDir[0] == "/" )
        {
            return eZDir::path( array( $cacheDir ) );
        }
        else
        {
            return eZDir::path( array( self::varDirectory(), $cacheDir ) );
        }
    }
1012709
public function getRootDir()
    {
        if (!is_null($this->rootDirPrefix)) {
            return $this->rootDirPrefix;
        }

        $bundles = array_map(function ($bundle) {
            return is_object($bundle)
                ? get_class($bundle)
                : $bundle;
        }, $this->bundlesToLoad);
        $config = $this->configuration;
        $routes = $this->routes;
        sort($bundles);
        sort($routes);
        $this->sortArray($config);

        return sys_get_temp_dir().'/base-kernel/'.'kernel-'.(
            hash(
                'md5',
                json_encode([
                    $bundles,
                    $config,
                    $routes,
                ])
            )
        );
    }
975242
protected function getConfigurationDirectory()
    {
        $reflector = new \ReflectionClass($this);
        $fileName = $reflector->getFileName();

        if (!is_dir($directory = dirname($fileName) . $this->configDirectory)) {
            throw new \RuntimeException(sprintf('The configuration directory "%s" does not exists.', $directory));
        }

        return $directory;
    }
194696
public function getConfigDirectory()
    {
        $directory = $this->baseDir.DIRECTORY_SEPARATOR.BundleInterface::CONFIG_DIRECTORY_NAME;
        if (false === is_dir($directory)) {
            $directory = $this->baseDir.DIRECTORY_SEPARATOR.BundleInterface::OLD_CONFIG_DIRECTORY_NAME;
        }

        return $directory;
    }
334449
protected function getRepositoryDirectory()
    {
        if($config = $this->configFileMissing()) {
            return $this->error($config);
        }

        return 'app/' . rtrim($this->getConfigRepositoryDirectory(), '/\\') . '/';
    }
38268
def system_config_dir():
    
    """
    if LINUX or SUNOS:
        path = '/etc'
    elif BSD or MACOS:
        path = '/usr/local/etc'
    else:
        path = os.environ.get('APPDATA')
    if path is None:
        path = ''
    else:
        path = os.path.join(path, 'glances')

    return path