Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 3c3286a Nov 14, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Fix edge case Oct 19, 2017
tests Add failing test for Windows home dir. Aug 30, 2014
.gitignore Use library as composer type Oct 24, 2014
.travis.yml Update .travis.yml Sep 8, 2017
LICENSE Fix example code in Feb 2, 2015
composer.json Revert "changed composer.json to my fork" Sep 6, 2017
phpunit.xml.dist Initial commit Jun 30, 2014

XDG Base Directory

Software License Build Status

Implementation of XDG Base Directory specification for php


Via Composer

$ composer require dnoegel/php-xdg-base-dir


$xdg = new \XdgBaseDir\Xdg();

echo $xdg->getHomeDir();
echo $xdg->getHomeConfigDir();
echo $xdg->getHomeDataDir();
echo $xdg->getHomeCacheDir();
echo $xdg->getRuntimeDir();

print_r($xdg->getDataDirs()); // returns array
print_r($xdg->getConfigDirs()); // returns array


$ phpunit


The MIT License (MIT). Please see License File for more information.

You can’t perform that action at this time.