@Environment(value=CLIENT) static class PackScreen.DirectoryWatcher extends Object implements AutoCloseable
| Modifier and Type | Field and Description |
|---|---|
private Path |
path |
private WatchService |
watchService |
| Constructor and Description |
|---|
DirectoryWatcher(File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static PackScreen.DirectoryWatcher |
create(File file) |
boolean |
pollForChange() |
private void |
watchDirectory(Path path) |
private final WatchService watchService
private final Path path
public DirectoryWatcher(File file) throws IOException
IOException@Nullable public static PackScreen.DirectoryWatcher create(File file)
private void watchDirectory(Path path) throws IOException
IOExceptionpublic boolean pollForChange()
throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOException