Quoting Rickard Öberg <[email protected]>:
> 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
When you write "1=executing user", you mean "executing user home directory"
don't you ?
> 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?
There seems to be a difference between MacOS/Linux and Windows. On the formers
you store cache in the user directory but on the later in the system temporary
directory. Is this on purpose ?
> 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.
This seems perfect for a desktop application but on servers you often want to
fine tune all this a bit more. Is there a way to override programmaticaly,
maybe
at assembly time, each of the root directories ?
Paul
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev