Search in sources :

Example 1 with FileWatcher

use of com.djrapitops.plan.settings.upkeep.FileWatcher in project Plan by plan-player-analytics.

the class NetworkSettingManager method prepareFileWatcher.

private FileWatcher prepareFileWatcher() {
    FileWatcher fileWatcher = new FileWatcher(serverSettingsFolder, errorLogger);
    File[] configFiles = getConfigFiles();
    if (configFiles != null) {
        for (File file : configFiles) {
            addFileToWatchList(fileWatcher, file);
        }
    }
    return fileWatcher;
}
Also used : FileWatcher(com.djrapitops.plan.settings.upkeep.FileWatcher) WatchedFile(com.djrapitops.plan.settings.upkeep.WatchedFile) File(java.io.File)

Example 2 with FileWatcher

use of com.djrapitops.plan.settings.upkeep.FileWatcher in project Plan by plan-player-analytics.

the class ServerSettingsManager method prepareFileWatcher.

private FileWatcher prepareFileWatcher() {
    FileWatcher fileWatcher = new FileWatcher(files.getDataFolder(), errorLogger);
    File configFile = files.getConfigFile();
    fileWatcher.addToWatchlist(new WatchedFile(configFile, () -> updateConfigInDB(configFile)));
    return fileWatcher;
}
Also used : FileWatcher(com.djrapitops.plan.settings.upkeep.FileWatcher) WatchedFile(com.djrapitops.plan.settings.upkeep.WatchedFile) File(java.io.File) WatchedFile(com.djrapitops.plan.settings.upkeep.WatchedFile)

Aggregations

FileWatcher (com.djrapitops.plan.settings.upkeep.FileWatcher)2 WatchedFile (com.djrapitops.plan.settings.upkeep.WatchedFile)2 File (java.io.File)2