package com.kdanmobile.reader.copyfile

import java.io.File
import java.io.FileInputStream
import java.io.InputStream

class FilePathSource(private val srcFilePath: String): CopyFileSource {

    override fun getFileName(): String? {
        return File(srcFilePath).name
    }

    override fun getFilePath(): String? {
        return File(srcFilePath).absolutePath
    }

    override fun getFileSize(): Long? {
        return File(srcFilePath).length()
    }

    override fun getInputStream(): InputStream? {
        return FileInputStream(srcFilePath)
    }
}