diff --git a/console/build.gradle b/console/build.gradle index f66a3e64f0e9aa7865f8deeabff1a53024a3e80a..178bd493e8aed27bce9c68c5bc14fca31348e36f 100644 --- a/console/build.gradle +++ b/console/build.gradle @@ -13,5 +13,5 @@ dependencies { application { // Define the main class for the application. - mainClass = 'notes.multi.console.Console.kt' + mainClass = 'notes.multi.console.ConsoleKt' } diff --git a/utilities/src/main/kotlin/notes/multi/utilities/Filemanager.kt b/utilities/src/main/kotlin/notes/multi/utilities/Filemanager.kt new file mode 100644 index 0000000000000000000000000000000000000000..8963081c83529ad20f69a3a8c5a72e61fe7d1eca --- /dev/null +++ b/utilities/src/main/kotlin/notes/multi/utilities/Filemanager.kt @@ -0,0 +1,29 @@ +package notes.multi.utilities + +import java.io.File +import java.io.FileInputStream +import java.util.* +import kotlin.io.path.exists +class Filemanager(val dir: String) { + private val directory = File(dir) + + fun files() : MutableList<File> { + val retfiles = mutableListOf<File>() + for (f in directory.listFiles()!!) { + if (f.extension == "txt" || f.extension == "md") { + retfiles.add(f) + } + } + return retfiles + } + + + fun createfile() { + //TODO: Create File + } + + fun deletefile(path:String) { + //TODO: DELETE FILE + } + +} \ No newline at end of file