feat: logging watcher and rename class

This commit is contained in:
aro 2022-11-15 13:06:04 +01:00
parent 9bc92951e4
commit 72616ba44a
3 changed files with 10 additions and 9 deletions

View file

@ -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

View file

@ -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>)

View file

@ -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})")
} }
} }