インタフェース
java.nio.file.WatchKeyの使用
WatchKeyを使用するパッケージ
-
java.nio.fileでのWatchKeyの使用
WatchKeyを返すjava.nio.fileのメソッド修飾子と型メソッド説明WatchService.poll()次の監視キーを取得して削除します。何も存在しない場合はnullを返します。次の監視キーを取得して削除します。何も存在しない場合は、必要に応じて指定された待機時間まで待機します。default WatchKeyPath.register(WatchService watcher, WatchEvent.Kind<?>... events) このパスで検出されたファイルを監視サービスに登録します。Path.register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) このパスで検出されたファイルを監視サービスに登録します。Watchable.register(WatchService watcher, WatchEvent.Kind<?>... events) オブジェクトを監視サービスに登録します。Watchable.register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers) オブジェクトを監視サービスに登録します。WatchService.take()次の監視キーを取得して削除します。何も存在しない場合は待機します。