インタフェース
java.nio.file.WatchKeyの使用
-
WatchKeyを使用しているパッケージ パッケージ 説明 java.nio.file ファイル、ファイル属性、およびファイル・システムにアクセスするためのJava仮想マシン用のインタフェースとクラスを定義します。 -
-
java.nio.fileでのWatchKeyの使用
WatchKeyを返すjava.nio.fileのメソッド 修飾子と型 メソッド 説明 WatchKeyWatchService. poll()次の監視鍵を取得して削除します。何も存在しない場合はnullを返します。WatchKeyWatchService. poll(long timeout, TimeUnit unit)次の監視鍵を取得して削除します。何も存在しない場合は、必要に応じて指定された待機時間まで待機します。default WatchKeyPath. register(WatchService watcher, WatchEvent.Kind<?>... events)このパスで検出されたファイルを監視サービスに登録します。WatchKeyPath. register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers)このパスで検出されたファイルを監視サービスに登録します。WatchKeyWatchable. register(WatchService watcher, WatchEvent.Kind<?>... events)オブジェクトを監視サービスに登録します。WatchKeyWatchable. register(WatchService watcher, WatchEvent.Kind<?>[] events, WatchEvent.Modifier... modifiers)オブジェクトを監視サービスに登録します。WatchKeyWatchService. take()次の監視鍵を取得して削除します。何も存在しない場合は待機します。
-