On Mon, Sep 12, 2011 at 5:35 PM, Sergiu
Dumitriu<sergiu(a)xwiki.com> wrote:
On 09/12/2011 09:47 AM, Thomas Mortagne wrote:
Ok new proposal:
* introduce ApplicationContext#getWorkDirectory
* introduce container.workDirectory in xwiki.properties
* for now keep same behavior as XWiki#getWorkDirectory: if
container.workDirectory is not defined then fallback on
getTemporaryDirectory()
+1. Not sure getWorkDirectory is the best name, though. It doesn't
contrast enough with getTemporaryDirectory, especially since
getTemporaryDirectory usually returns something called "work".
The meaning of the function is: get me a directory where I can safely
write some data that will be available after restarts (best effort). By
the way, it should be mentioned in the javadoc that there's no hard
guarantee that the data won't be removed between restarts.
Some proposals:
- getPermanentDataDirectory
- getPermanentStorageDirectory
- getSafeStorageDirectory
- getDataStorageDirectory
- getDataDirectory
- getWorkDataDirectory
I think my slightly favorite is getPermanentDataDirectory.
I think I would prefer "getPermanentDirectory" which fits better when
you compare it to "getTemporaryDirectory". Permanent vs Temporary
sounds good. Both are about datas anyway. Same renaming for the
property, right ?