Directory Monitor
This feature is provided for mount directories. It is usually better to use WatchService.
Monitor the creation of subdirectories. The reporting timing is when a file that matches the conditions exists in the subdirectory. By default, if a file exists in a subdirectory, it will be reported to the listener. サブディレクトリの作成をモニタする。 報告タイミングは、サブディレクトリ内に条件に一致したファイルが存在している場合になる。 デフォルトではサブディレクトリ内にファイルが存在すればリスナーに報告する。
val mon = Monitor("dir".toPath(), "*.ind")
mon.submit {
println(it)
}Content copied to clipboard