I know it's not the default way of organizing things, but if I could choose 
freely, I would collect things in Qi4j folders like:

Mac:
configuration={1}/Library/Preferences/Qi4j/{0} - most useful here...
data={1}/Library/Application Support/Qi4j/{0} - maybe?
temporary={3}/{0}
cache={1}/Library/Caches/Qi4j/{0} - maybe?
log={1}/Library/Logs/Qi4j/{0} - maybe?

For instance, my {1}/LIbrary/Preferences/ currently contains 684 items (!) so 
preferences for my qi4j-apps would be quite dislocated from each other if they 
where not in a shared Qi4j folder. I think it would be nice to easily be able 
to locate and inspect all my qi4j-apps (in one place) in the file system too. 
Or are the FileConfiguration also supposed to be used by non-Qi4j applications?

You could potentially have tens of qi4j-applications "spread all over" - 
personally I would prefer to have their config/support/cache/logs data grouped 
in Qi4j-folders. Just my 2 cents.

Maybe it could be useful for other OS's too?

Cheers,
Marc

On 19/01/2011, at 09.50, Rickard Öberg wrote:

> Hi guys,
> 
> I'm working on a Qi4j app in Norway this week, and as a part of that I'm 
> porting a bunch of libraries from Streamflow to Qi4j. One of those libraries 
> is called FileConfiguration, and is basically a service that determines the 
> root directores for various things (data/config/temp/log, etc.) for different 
> OS's.
> 
> I have made an initial commit, and it's pretty straightforward stuff. What 
> I'd like feedback on is whether the default rules are ok for the different 
> platforms. They are defined in a ResourceBundle, and are as follows.
> 
> Arguments:
> 0=application name, 1=executing user, 2=os name, 3=temp dir
> 
> Mac:
> configuration={1}/Library/Preferences/{0}
> data={1}/Library/Application Support/{0}
> temporary={3}/{0}
> cache={1}/Library/Caches/{0}
> log={1}/Library/Logs/{0}
> 
> Windows:
> configuration={1}/Application Data/{0}/conf
> data={1}/Application Data/{0}/data
> temporary={3}/{0}
> cache={3}/{0}/cache
> log={1}/Application Data/{0}/log
> 
> Unix(/Linux):
> configuration={1}/.{0}/etc
> data={1}/.{0}/data
> temporary={3}/{0}
> cache={1}/.{0}/cache
> log={1}/.{0}/log
> 
> Does this reflect the defaults for the various OS's, as far as you know?
> 
> If yes, the next step is to change the various libraries and extensions to 
> use this when determining where to store data. Typically data should be 
> stored in {data}/{service id}/ so that it's easy to figure out what goes 
> where.
> 
> /Rickard
> 
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev

_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to