From 684be0c50e9485ab3d6cd7ff17633cea706451fb Mon Sep 17 00:00:00 2001 From: Zlatin Balevsky Date: Sun, 16 Jun 2019 07:03:16 +0100 Subject: [PATCH] start of work on directory watcher --- core/src/main/groovy/com/muwire/core/MuWireSettings.groovy | 3 +++ .../main/groovy/com/muwire/core/files/DirectoryWatcher.groovy | 4 ++++ 2 files changed, 7 insertions(+) create mode 100644 core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy diff --git a/core/src/main/groovy/com/muwire/core/MuWireSettings.groovy b/core/src/main/groovy/com/muwire/core/MuWireSettings.groovy index 8eef431d..d1078ceb 100644 --- a/core/src/main/groovy/com/muwire/core/MuWireSettings.groovy +++ b/core/src/main/groovy/com/muwire/core/MuWireSettings.groovy @@ -13,6 +13,7 @@ class MuWireSettings { String sharedFiles CrawlerResponse crawlerResponse boolean shareDownloadedFiles + boolean watchSharedDirectories MuWireSettings() { this(new Properties()) @@ -29,6 +30,7 @@ class MuWireSettings { downloadRetryInterval = Integer.parseInt(props.getProperty("downloadRetryInterval","15")) updateCheckInterval = Integer.parseInt(props.getProperty("updateCheckInterval","36")) shareDownloadedFiles = Boolean.parseBoolean(props.getProperty("shareDownloadedFiles","true")) + watchSharedDirectories = Boolean.parseBoolean(props.getProperty("watchSharedDirectories","true")) } void write(OutputStream out) throws IOException { @@ -41,6 +43,7 @@ class MuWireSettings { props.setProperty("downloadRetryInterval", String.valueOf(downloadRetryInterval)) props.setProperty("updateCheckInterval", String.valueOf(updateCheckInterval)) props.setProperty("shareDownloadedFiles", String.valueOf(shareDownloadedFiles)) + props.setProperty("watchSharedDirectories", String.valueOf(watchSharedDirectories)) if (sharedFiles != null) props.setProperty("sharedFiles", sharedFiles) props.store(out, "") diff --git a/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy b/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy new file mode 100644 index 00000000..1410786a --- /dev/null +++ b/core/src/main/groovy/com/muwire/core/files/DirectoryWatcher.groovy @@ -0,0 +1,4 @@ +package com.muwire.core.files + +class DirectoryWatcher { +}