Skip to content
Snippets Groups Projects
Commit 72ef8eb2 authored by abhqy's avatar abhqy
Browse files

Merge branch 'main' of https://git.uwaterloo.ca/a32menon/notes-app into Classes

parents be4a2b77 cf560f7e
No related branches found
No related tags found
1 merge request!3Constructor
...@@ -13,5 +13,5 @@ dependencies { ...@@ -13,5 +13,5 @@ dependencies {
application { application {
// Define the main class for the application. // Define the main class for the application.
mainClass = 'notes.multi.console.Console.kt' mainClass = 'notes.multi.console.ConsoleKt'
} }
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment