Provide a data directory to plugins on demand

If a plugin requests a data directory with a @PluginData File
dependency, a data directory will be created automatically by the
server in $site_path/data/$plugin_name and passed to the plugin.

Plugins can use this to store any data they want.

Change-Id: I98de44a033889740cafc8a3d72c582c0e99b7ffd
This commit is contained in:
Shawn O. Pearce
2012-05-10 17:44:24 -07:00
parent d7f89fb05f
commit a252ee599d
5 changed files with 75 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ public class SitePathInitializer {
mkdir(site.mail_dir);
mkdir(site.static_dir);
mkdir(site.plugins_dir);
mkdir(site.data_dir);
for (InitStep step : steps) {
step.run();