com.swoval.files.PlatformWatcher Maven / Gradle / Ivy
package com.swoval.files;
import com.swoval.files.PathWatchers.Event;
import java.io.IOException;
class PlatformWatcher {
static PathWatcher make(
final boolean followLinks, final DirectoryRegistry directoryRegistry)
throws InterruptedException, IOException {
return make(followLinks, RegisterableWatchServices.get(), directoryRegistry);
}
static PathWatcher make(
final boolean followLinks,
final RegisterableWatchService registerableWatchService,
final DirectoryRegistry directoryRegistry)
throws InterruptedException, IOException {
final PathWatcher pathWatcher =
new NioPathWatcher(directoryRegistry, registerableWatchService);
return followLinks
? new SymlinkFollowingPathWatcher(pathWatcher, directoryRegistry)
: pathWatcher;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy