mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2024-11-23 01:06:17 +00:00
Started partial rewrite because the converter isn't thaaat intelligent.
This commit is contained in:
parent
deb5e316cb
commit
3a4508012a
@ -45,15 +45,12 @@ import org.apache.commons.io.FileUtils
|
|||||||
|
|
||||||
abstract class AbstractMediaFileManager(protected var message: TLMessage, protected var user: UserManager, protected var client: TelegramClient) {
|
abstract class AbstractMediaFileManager(protected var message: TLMessage, protected var user: UserManager, protected var client: TelegramClient) {
|
||||||
var isEmpty = false
|
var isEmpty = false
|
||||||
protected set
|
|
||||||
abstract val size: Int
|
abstract val size: Int
|
||||||
abstract val extension: String
|
abstract val extension: String
|
||||||
val isDownloaded: Boolean
|
|
||||||
get() = File(targetPathAndFilename).isFile()
|
fun isDownloaded() { return File(targetPathAndFilename).isFile() }
|
||||||
val isDownloading: Boolean
|
fun isDownloading() {return File(targetPathAndFilename + ".downloading").isFile() }
|
||||||
get() = File(targetPathAndFilename + ".downloading").isFile()
|
fun targetPath() {
|
||||||
val targetPath: String
|
|
||||||
get() {
|
|
||||||
val path = user.getFileBase() + Config.FILE_FILES_BASE + File.separatorChar
|
val path = user.getFileBase() + Config.FILE_FILES_BASE + File.separatorChar
|
||||||
File(path).mkdirs()
|
File(path).mkdirs()
|
||||||
return path
|
return path
|
||||||
|
Loading…
Reference in New Issue
Block a user