All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jvmMain.com.seiko.imageloader.component.keyer.FileKeyer.kt Maven / Gradle / Ivy

There is a newer version: 1.9.0
Show newest version
package com.seiko.imageloader.component.keyer

import com.seiko.imageloader.option.Options
import java.io.File

class FileKeyer(
    private val addLastModifiedToFileCacheKey: Boolean = true,
) : Keyer {
    override fun key(data: Any, options: Options): String? {
        if (data !is File) return null
        return if (addLastModifiedToFileCacheKey) {
            "${data.path}:${data.lastModified()}"
        } else {
            data.path
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy