summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrent Mick <trentm@gmail.com>2010-07-28 00:15:01 -0700
committerTrent Mick <trentm@gmail.com>2010-07-28 00:15:01 -0700
commit330cb2e8d0aa158c58d79e810aa78c5de2418def (patch)
tree01d9e93ae0e5350a5a1fece9bcd6044d1b07e220
parentd1fa6cd2449d53e6e55a32f76e431f8dd5ae8b89 (diff)
downloadappdirs-330cb2e8d0aa158c58d79e810aa78c5de2418def.tar.gz
singular 'cache'
-rw-r--r--CHANGES.md1
-rw-r--r--README.md12
-rw-r--r--lib/appdirs.py6
3 files changed, 10 insertions, 9 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 32ffc1d..fba900d 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -2,6 +2,7 @@
## appdirs 1.1.0 (not yet released)
+- Change default `user_cache_dir()` on Linux to be singular, e.g. "~/.superapp/cache".
- Add `roaming` option to `user_data_dir()` (for use on Windows only) and change
the default `user_data_dir` behaviour to use a *non*-roaming profile dir
(`CSIDL_LOCAL_APPDATA` instead of `CSIDL_APPDATA`). Why? Because a large
diff --git a/README.md b/README.md
index 7c3b90b..4596460 100644
--- a/README.md
+++ b/README.md
@@ -25,7 +25,7 @@ On Linux (and other Unices) the dir is typically:
This kind of thing is what the `appdirs` module is for. `appdirs`:
- will tell you an appropriate user data dir (`user_data_dir`)
-- will tell you an appropriate user caches dir (`user_caches_dir`)
+- will tell you an appropriate user cache dir (`user_cache_dir`)
- will tell you an appropriate site data dir (`site_data_dir`)
- is a single module so other Python packages can include their own private copy
- is slightly opinionated on the directory names used (especially on Linux/Unix
@@ -56,11 +56,11 @@ On Windows 7:
'C:\\Users\\trentm\\AppData\\Roaming\\Acme\\SuperApp'
>>> user_cache_dir(appname, appauthor)
'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp'
- # Suggest at least "Caches" is appended to this to separate from
+ # Suggest at least "Cache" is appended to this to separate from
# `user_data_dir`.
>>> from os.path import join
- >>> join(user_cache_dir(appname, appauthor), "Caches")
- 'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Caches'
+ >>> join(user_cache_dir(appname, appauthor), "Cache")
+ 'C:\\Users\\trentm\\AppData\\Local\\Acme\\SuperApp\\Cache'
On Linux:
@@ -72,7 +72,7 @@ On Linux:
>>> site_data_dir(appname, appauthor)
'/etc/superapp'
>>> user_cache_dir(appname, appauthor)
- '/home/trentm/.superapp/caches'
+ '/home/trentm/.superapp/cache'
# `AppDirs` for convenience
@@ -86,7 +86,7 @@ On Linux:
>>> dirs.user_cache_dir
'/Users/trentm/Library/Caches/SuperApp'
-Note that the `AppDirs` default on Windows is to append "Caches" to the
+Note that the `AppDirs` default on Windows is to append "Cache" to the
`.user_cache_dir` as suggested above.
diff --git a/lib/appdirs.py b/lib/appdirs.py
index 03c858d..949100b 100644
--- a/lib/appdirs.py
+++ b/lib/appdirs.py
@@ -139,11 +139,11 @@ def user_cache_dir(appname, appauthor=None, version=None):
Typical user cache directories are:
Mac OS X: ~/Library/Caches/<AppName>
- Unix: ~/.<appname>/caches
+ Unix: ~/.<appname>/cache
Win XP: C:\Documents and Settings\<username>\Local Settings\Application Data\<AppAuthor>\<AppName>
Vista: C:\Users\<username>\AppData\Local\<AppAuthor>\<AppName>
- For Unix there is no *real* standard here. This "caches" subdir is a
+ For Unix there is no *real* standard here. This "cache" subdir is a
suggestion from me.
On Windows, note that this is identical to the non-roaming `user_data_dir`.
@@ -172,7 +172,7 @@ def user_cache_dir(appname, appauthor=None, version=None):
basepath = path.FSRefMakePath()
path = os.path.join(basepath, appname)
else:
- path = os.path.expanduser("~/.%s/caches" % appname.lower())
+ path = os.path.expanduser("~/.%s/cache" % appname.lower())
if version:
path = os.path.join(path, version)
return path