Convert plugin loading code to use Path

All of the internal scanning/loading code now uses Path, as do the
plugin and data directories in SitePaths. For backwards compatibility,
we still inject the @PluginData directory as a File. We do break
backwards compatibility of the ServerPluginProvider extension point,
under the theory that there should be very few such extensions and
they can handle the pain.

Tested:
-Installed and reloaded cookbook plugin multiple times.
-Expanded dynamic *.ssh plugin loading in the cookbook, with
 monkey-testing.

Change-Id: I5212d248d9288b88d08731c9854b42196999aa73
This commit is contained in:
Dave Borowitz
2015-02-24 10:17:04 -08:00
parent 05b1ae22d5
commit 9e158756e5
17 changed files with 350 additions and 293 deletions

View File

@@ -35,8 +35,8 @@ public final class SitePaths {
public final Path lib_dir;
public final Path tmp_dir;
public final File logs_dir;
public final File plugins_dir;
public final File data_dir;
public final Path plugins_dir;
public final Path data_dir;
public final File mail_dir;
public final File hooks_dir;
public final File static_dir;
@@ -74,8 +74,8 @@ public final class SitePaths {
etc_dir = p.resolve("etc");
lib_dir = p.resolve("lib");
tmp_dir = p.resolve("tmp");
plugins_dir = new File(site_path, "plugins");
data_dir = new File(site_path, "data");
plugins_dir = p.resolve("plugins");
data_dir = p.resolve("data");
logs_dir = new File(site_path, "logs");
mail_dir = etc_dir.resolve("mail").toFile();
hooks_dir = new File(site_path, "hooks");