create Folder app - Android

This commit is contained in:
hasinarak3@gmail.com 2026-02-06 09:54:10 +03:00
parent 6dd58b8bb3
commit 01d44d6b42

View file

@ -2,8 +2,19 @@ package mg.dot.feufaro
import android.content.Context
import org.koin.core.context.GlobalContext
import java.io.File
actual fun getConfigDirectoryPath(): String {
val context = GlobalContext.get().get<Context>()
return context.filesDir.absolutePath
val baseDir = GlobalContext.get().get<Context>().filesDir
val feufa2Folder = File(baseDir, "Feufaro")
if (!feufa2Folder.exists()) {
val created = feufa2Folder.mkdirs()
if (created) {
println("CP:15: Dossier créé avec succès : ${feufa2Folder.absolutePath}")
}
}
val path = feufa2Folder.absolutePath
return if (path.endsWith(File.separator)) path else path + File.separator
}