---------- Forwarded message ----------
From: "Simon Sapin" <simon.sa...@exyr.org>
Date: Dec 17, 2015 11:06 AM
Subject: Profile directory (Re: [dev-servo] IndexDB project)
To: "Josh Matthews" <j...@joshmatthews.net>
Cc:

On 17/12/15 14:43, Josh Matthews wrote:

> We still don't have any persistent storage in Servo, such as a profile
> folder. I would be fine with adding a command line option to provide a
> profile directory, or creating a temporary directory if none is provided.
>

At least on Linux, there are conventions of where things like a profile
directory should go:

http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

Different types of things (config, cache, user data, …), each with a
default location like $HOME/.config and an environment variable to override
them (so a command-line argument may not be necessary)

And there’s a Rust implementation that does the environment variable
lookup, fallbacks, creates directories as needed, etc:

https://crates.io/crates/xdg/
https://whitequark.github.io/rust-xdg/xdg/struct.BaseDirectories.html


I don’t know about other platforms’ conventions, but this can be a start.

-- 
Simon Sapin
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to