Skip to content
Snippets Groups Projects
Commit 968346ac authored by Inseo Kim's avatar Inseo Kim
Browse files

File management error has been fixed

parent 2ce3753f
No related branches found
No related tags found
1 merge request!6File management error has been fixed
Pipeline #83384 passed
......@@ -9,5 +9,5 @@ fun main() {
// thesea re test functions feel free to use
val f = Filemanager("${System.getProperty("user.dir")}/test/", "hello.txt")
f.writefile("hello world")
println(f.openfile())
println(f.openfile())
}
......@@ -28,7 +28,7 @@ class Filemanager(private val dir: String, private val name: String) {
// opens and read the existing file
fun openfile(): String {
if (listfiles.contains(filepath)) {
if (!listfiles.contains(filepath)) {
return ""
}
val inputStream: InputStream = filepath.inputStream()
......
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