StorageDomain.TextFile


class StorageDomain.TextFile : StorageDomain


Targets local raw text files stored within internal app storage.

Summary

Public constructors

TextFile(path: String, content: String, isDeviceProtectedStorage: Boolean)

Public functions

open operator Boolean
equals(other: Any?)
open Int
open String

Public properties

String

The string content of the file.

Boolean

Whether the file is in device-protected storage, which is available before the user first unlocks the device, rather than in the default storage of the app.

String

The path of the file, relative to the app's files directory (Context.getFilesDir()), such as "my_data.txt".

Public constructors

TextFile

Added in 1.0.0-alpha04
TextFile(
    path: String,
    content: String,
    isDeviceProtectedStorage: Boolean = false
)

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

content

Added in 1.0.0-alpha04
val content: String

The string content of the file.

isDeviceProtectedStorage

Added in 1.0.0-alpha04
val isDeviceProtectedStorage: Boolean

Whether the file is in device-protected storage, which is available before the user first unlocks the device, rather than in the default storage of the app. That is credential-encrypted storage, unless the app sets android:defaultToDeviceProtectedStorage. A relative path then starts at the files directory of device-protected storage.

path

Added in 1.0.0-alpha04
val path: String

The path of the file, relative to the app's files directory (Context.getFilesDir()), such as "my_data.txt". An absolute path is used as is.