fs.appdirfs

A collection of filesystems that map to application specific locations.

These classes abstract away the different requirements for user data across platforms, which vary in their conventions. They are all subclasses of OSFS, all that differs from OSFS is the constructor which detects the appropriate location given the name of the application, author name and other parameters.

Uses appdirs (https://github.com/ActiveState/appdirs), written by Trent Mick and Sridhar Ratnakumar <trentm at gmail com; github at srid name>

class fs.appdirfs.UserDataFS(appname, appauthor=None, version=None, roaming=False, create=True)

A filesystem for per-user application data.

Parameters:
  • appname – the name of the application
  • appauthor – the name of the author (used on Windows)
  • version – optional version string, if a unique location per version of the application is required
  • roaming – if True, use a roaming profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
  • create – if True (the default) the directory will be created if it does not exist
class fs.appdirfs.SiteDataFS(appname, appauthor=None, version=None, roaming=False, create=True)

A filesystem for application site data.

Parameters:
  • appname – the name of the application
  • appauthor – the name of the author (not used on linux)
  • version – optional version string, if a unique location per version of the application is required
  • roaming – if True, use a roaming profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
  • create – if True (the default) the directory will be created if it does not exist
class fs.appdirfs.UserCacheFS(appname, appauthor=None, version=None, roaming=False, create=True)

A filesystem for per-user application cache data.

Parameters:
  • appname – the name of the application
  • appauthor – the name of the author (not used on linux)
  • version – optional version string, if a unique location per version of the application is required
  • roaming – if True, use a roaming profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
  • create – if True (the default) the directory will be created if it does not exist
class fs.appdirfs.UserLogFS(appname, appauthor=None, version=None, roaming=False, create=True)

A filesystem for per-user application log data.

Parameters:
  • appname – the name of the application
  • appauthor – the name of the author (not used on linux)
  • version – optional version string, if a unique location per version of the application is required
  • roaming – if True, use a roaming profile on Windows, see http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx
  • create – if True (the default) the directory will be created if it does not exist