mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2026-01-25 21:14:04 +01:00
Cleanup
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package ca.gosyer.util.system
|
||||
|
||||
import ca.gosyer.BuildConfig
|
||||
import java.io.File
|
||||
|
||||
fun processFile() {
|
||||
val pidFile = ProcessHandle.current().pid()
|
||||
val strTmp = System.getProperty("java.io.tmpdir")
|
||||
val file = File("$strTmp/${BuildConfig.NAME}.pid")
|
||||
|
||||
// backup deletion
|
||||
if (file.exists()) {
|
||||
file.delete()
|
||||
}
|
||||
|
||||
file.writeText(pidFile.toString())
|
||||
|
||||
file.deleteOnExit()
|
||||
}
|
||||
Reference in New Issue
Block a user