feat: logging watcher and rename class
This commit is contained in:
parent
9bc92951e4
commit
72616ba44a
3 changed files with 10 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
||||||
package xyz.atnrch.wrench.scheduler
|
package xyz.atnrch.wrench.watcher
|
||||||
|
|
||||||
import kotlinx.coroutines.*
|
import kotlinx.coroutines.*
|
||||||
import kotlinx.coroutines.swing.Swing
|
import kotlinx.coroutines.swing.Swing
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package xyz.atnrch.wrench.io
|
package xyz.atnrch.wrench.watcher
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
|
|
||||||
data class IOPath(val file: File, val map: ArrayList<Path>)
|
data class WatcherEntry(val file: File, val map: ArrayList<Path>)
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
package xyz.atnrch.wrench.io
|
package xyz.atnrch.wrench.watcher
|
||||||
|
|
||||||
|
import xyz.atnrch.wrench.logger.Logger
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
||||||
class IOManager {
|
class WatcherManager {
|
||||||
private val paths: List<IOPath>
|
private val entries: List<WatcherEntry>
|
||||||
|
|
||||||
init {
|
init {
|
||||||
paths = arrayListOf()
|
entries = arrayListOf()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addFile(file: File) {
|
fun addFile(file: File) {
|
||||||
val path = IOPath(file, arrayListOf())
|
val watcherEntry = WatcherEntry(file, arrayListOf())
|
||||||
println("")
|
Logger.info("Traking new file: ${file.name} (${file.absolutePath})")
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in a new issue