Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] AppDirs v0.2

44 views
Skip to first unread message

Lawrence Woodman

unread,
Jun 30, 2015, 10:58:27 AM6/30/15
to

A Tcl Module to Simplify Cross-platform Application File Locations

An application that is installed on a variety of platforms will use
different locations on each platform to access files. This module aims to
provide access to these locations through a common interface. For each
operating system the module aims to use an appropriate standard for the
locations, for example on Linux the XDG Base Directory Specification is
used and on Microsoft Windows or Darwin/Mac OS X the most common locations
for each version of the operating system is used.


Project page:
http://vlifesystems.com/projects/appdirs_tcl/
Github:
https://github.com/LawrenceWoodman/appdirs_tcl


Changes:
AppDirs v0.2 brings support for Darwin thanks to Steve Havelka


Module Usage:
First create an instance of the AppDirs class by instantiating it with
a brand and applicationName. The brand may be ignored depending on the
platform that is being used. You can then call the methods on this
instance as follows:

package require AppDirs

set myAppDirs [AppDirs new myBrand myApp]

# Return location of user-specific data files
puts "data home: [$myAppDirs dataHome]"

# Return location of user-specific configuration files
puts "config home: [$myAppDirs configHome]"

# Return a list of locations for system-wide configuration files in preference order
puts "data dirs: [$myAppDirs dataDirs]"

# Return a list of locations for system-wide data files in preference order
puts "config dirs: [$myAppDirs configDirs]"


Feedback and contributions:
Both are very welcome and ideally should be made via GitHub or failing
that to me directly: lwoo...@vlifesystems.com


Licence:
The module is released under an MIT licence.


Best Wishes


Lorry


--
vLife Systems Ltd
Registered Office: The Apex, 2 Sheriffs Orchard, Coventry, CV1 3PP
Registered in England and Wales No. 06477649
http://vlifesystems.com
0 new messages