File::HomeDir::FreeDesktop(3pm)

File::HomeDir::FreeDesktop3pm

Find your home and other directories on freedesktop.org unix

Usage

  use File::HomeDir;
  
  # Find directories for the current user
  $home     = File::HomeDir->my_home;        # /home/mylogin
  $desktop  = File::HomeDir->my_desktop;
  $docs     = File::HomeDir->my_documents;
  $music    = File::HomeDir->my_music;
  $pics     = File::HomeDir->my_pictures;
  $videos   = File::HomeDir->my_videos;
  $data     = File::HomeDir->my_data;
  $config   = File::HomeDir->my_config;
  
  # Some undocumented ones, expect they don't work - use with caution
  $download    = File::HomeDir->my_download;
  $publicshare = File::HomeDir->my_publicshare;
  $templates   = File::HomeDir->my_templates;
  $cache       = File::HomeDir->my_cache;

Overview

This module provides implementations for determining common user directories. In normal usage this module will always be used via File::HomeDir.

This module can operate only when the command "xdg-user-dir" is available and executable, which is typically achieved by installed a package named "xdg-user-dirs" or similar.

One can find the latest spec at <https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html>.

Releases

8 releases since Debian 7 (Wheezy); the text changed 5 times.

  1. 7
  2. 8–9
  3. 10
  4. 11
  5. 12–13
  6. Arch

Authors

Jerome Quelin <[email protected]<gt>

Adam Kennedy <[email protected]>

From perl-file-homedir 1.006-8 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.