ReplaceContents

class ReplaceContents(val data: ByteArray) : FileAction

ReplaceContents is a FileAction that replaces the entire contents of a file.

Author

Richard Arriaga

Parameters

data

The ByteArray that is to be inserted in the file.

Constructors

Link copied to clipboard
fun ReplaceContents(data: ByteArray)

Construct an EditRange.

Functions

Link copied to clipboard
open override fun execute(    file: AvailFile,     timestamp: Long,     originator: UUID): TracedAction

Executes the action on the provided AvailFile and answer the TracedAction required to reverse this FileAction update.

Properties

Link copied to clipboard
val data: ByteArray

The ByteArray that is to be inserted in the file.

Link copied to clipboard
open override val isTraced: Boolean = true

true indicates this FileAction is traced in a TracedAction; false otherwise.

Link copied to clipboard
open override val type: FileActionType

The FileActionType that represents this FileAction.