mirror of
https://github.com/HMCore/Orbot.git
synced 2026-01-22 09:53:02 +00:00
Add service announcement channel
This commit is contained in:
11
src/main/kotlin/de/wulkanat/extensions/File.kt
Normal file
11
src/main/kotlin/de/wulkanat/extensions/File.kt
Normal file
@@ -0,0 +1,11 @@
|
||||
package de.wulkanat.extensions
|
||||
|
||||
import java.io.File
|
||||
|
||||
fun File.ensureExists(defaultText: String? = null): File {
|
||||
if (!this.exists()) {
|
||||
this.createNewFile()
|
||||
this.writeText(defaultText ?: return this)
|
||||
}
|
||||
return this
|
||||
}
|
||||
Reference in New Issue
Block a user