App Filesystems

Filesystems for platform-specific application directories.

A collection of filesystems that map to application specific locations defined by the OS.

These classes abstract away the different requirements for user data across platforms, which vary in their conventions. They are all subclasses of OSFS.

class fs.appfs.UserDataFS(appname, author=None, version=None, roaming=False, create=True)[source]

A filesystem for per-user application data.

Parameters:
  • appname (str) – The name of the application.
  • author (str) – The name of the author (used on Windows).
  • version (str) – Optional version string, if a unique location per version of the application is required.
  • roaming (bool) – If True, use a roaming profile on Windows.
  • create (bool) – If True (the default) the directory will be created if it does not exist.
class fs.appfs.UserConfigFS(appname, author=None, version=None, roaming=False, create=True)[source]

A filesystem for per-user config data.

Parameters:
  • appname (str) – The name of the application.
  • author (str) – The name of the author (used on Windows).
  • version (str) – Optional version string, if a unique location per version of the application is required.
  • roaming (bool) – If True, use a roaming profile on Windows.
  • create (bool) – If True (the default) the directory will be created if it does not exist.
class fs.appfs.SiteDataFS(appname, author=None, version=None, roaming=False, create=True)[source]

A filesystem for application site data.

Parameters:
  • appname (str) – The name of the application.
  • author (str) – The name of the author (used on Windows).
  • version (str) – Optional version string, if a unique location per version of the application is required.
  • roaming (bool) – If True, use a roaming profile on Windows.
  • create (bool) – If True (the default) the directory will be created if it does not exist.
class fs.appfs.SiteConfigFS(appname, author=None, version=None, roaming=False, create=True)[source]

A filesystem for application config data.

Parameters:
  • appname (str) – The name of the application.
  • author (str) – The name of the author (used on Windows).
  • version (str) – Optional version string, if a unique location per version of the application is required.
  • roaming (bool) – If True, use a roaming profile on Windows.
  • create (bool) – If True (the default) the directory will be created if it does not exist.
class fs.appfs.UserCacheFS(appname, author=None, version=None, roaming=False, create=True)[source]

A filesystem for per-user application cache data.

Parameters:
  • appname (str) – The name of the application.
  • author (str) – The name of the author (used on Windows).
  • version (str) – Optional version string, if a unique location per version of the application is required.
  • roaming (bool) – If True, use a roaming profile on Windows.
  • create (bool) – If True (the default) the directory will be created if it does not exist.
class fs.appfs.UserLogFS(appname, author=None, version=None, roaming=False, create=True)[source]

A filesystem for per-user application log data.

Parameters:
  • appname (str) – The name of the application.
  • author (str) – The name of the author (used on Windows).
  • version (str) – Optional version string, if a unique location per version of the application is required.
  • roaming (bool) – If True, use a roaming profile on Windows.
  • create (bool) – If True (the default) the directory will be created if it does not exist.