Git Product home page Git Product logo

perl-file-xdg's Introduction

NAME
    "File::XDG" - Basic implementation of the XDG base directory
    specification

SYNOPSIS
     use File::XDG;

     my $xdg = File::XDG->new(name => 'foo');

     # user config
     $xdg->config_home

     # user data
     $xdg->data_home

     # user cache
     $xdg->cache_home

     # system config
     $xdg->config_dirs

     # system data
     $xdg->data_dirs

DESCRIPTION
    This module provides a basic implementation of the XDG base directory
    specification as exists by the Free Desktop Organization (FDO). It
    supports all XDG directories except for the runtime directories, which
    require session management support in order to function.

CONSTRUCTOR
  $xdg = File::XDG->new( %args )
    Returns a new instance of a "File::XDG" object. This must be called with
    an application name as the "name" argument.

    Takes the following named arguments:

    name => STRING
            Name of the application for which File::XDG is being used.

METHODS
  $xdg->data_home()
    Returns the user-specific data directory for the application as a
    "Path::Class" object.

  $xdg->config_home()
    Returns the user-specific configuration directory for the application as
    a "Path::Class" object.

  $xdg->cache_home()
    Returns the user-specific cache directory for the application as a
    "Path::Class" object.

  $xdg->data_dirs()
    Returns the system data directories, not modified for the application.
    Per the specification, the returned string is :-delimited.

  $xdg->config_dirs()
    Returns the system config directories, not modified for the application.
    Per the specification, the returned string is :-delimited.

  $xdg->lookup_data_file('subdir', 'filename');
    Looks up the data file by searching for ./subdir/filename relative to
    all base directories indicated by $XDG_DATA_HOME and $XDG_DATA_DIRS. If
    an environment variable is either not set or empty, its default value as
    defined by the specification is used instead. Returns a "Path::Class"
    object.

  $xdg->lookup_config_file('subdir', 'filename');
    Looks up the configuration file by searching for ./subdir/filename
    relative to all base directories indicated by $XDG_CONFIG_HOME and
    $XDG_CONFIG_DIRS. If an environment variable is either not set or empty,
    its default value as defined by the specification is used instead.
    Returns a "Path::Class" object.

SEE ALSO
    XDG Base Directory specification, version 0.7
    <http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>

ACKNOWLEDGEMENTS
    This module's Windows support is made possible by "File::HomeDir". I
    would also like to thank "Path::Class" and "File::Spec".

AUTHOR
    Kiyoshi Aman <[email protected]>

perl-file-xdg's People

Contributors

vulpineamethyst avatar nnutter avatar pjf avatar olof avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.