Companion

object Companion

The companion of Source.

It provides some easy used static APIs for Source.

Functions

Link copied to clipboard
fun assets(path: String): Source<String>

Source from Android assets.

Link copied to clipboard
fun bundle(modelName: String, bundle: AssetBundle): Source<Any>
fun bundle(modelName: String, @WorkerThread bundleProvider: () -> AssetBundle): Source<Any>

Source in AssetBundle.

Link copied to clipboard
fun file(localFile: File): Source<String>

Create a data source from a local file.

fun file(absolutePath: String): Source<String>

Create a data source from an absolute file path.