public class IgnoreWatcher extends Object implements Watcher
| 构造器和说明 |
|---|
IgnoreWatcher() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
onCreate(WatchEvent<?> event,
Path currentPath)
文件创建时执行的方法
|
void |
onDelete(WatchEvent<?> event,
Path currentPath)
文件删除时执行的方法
|
void |
onModify(WatchEvent<?> event,
Path currentPath)
文件修改时执行的方法
文件修改可能触发多次 |
void |
onOverflow(WatchEvent<?> event,
Path currentPath)
事件丢失或出错时执行的方法
|
public void onCreate(WatchEvent<?> event, Path currentPath)
Watcherpublic void onModify(WatchEvent<?> event, Path currentPath)
Watcherpublic void onDelete(WatchEvent<?> event, Path currentPath)
Watcherpublic void onOverflow(WatchEvent<?> event, Path currentPath)
WatcheronOverflow 在接口中 Watcherevent - 事件currentPath - 事件发生的当前Path路径Copyright © 2022. All rights reserved.