Package-level declarations

Types

Link copied to clipboard
@Serializable
@SerialName(value = "DeleteFiles")
data class DeleteFilesEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val target: DeleteFilesEventSchema.DeleteTarget) : EventSchema

Deletes the file or files selected by target from the client's own file storage. With a DeleteTarget.Multiple every file is attempted, even after one fails.

Link copied to clipboard
@Serializable
enum FileOutputType : Enum<FileOutputType>

Controls the shape of the data delivered as incomingData by file-reading events.

Link copied to clipboard
@Serializable
@SerialName(value = "GetFile")
data class GetFileEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val fileName: String, val outputType: FileOutputType = FileOutputType.ArrayOfBytes) : EventSchema

Reads the file stored under fileName from the client's own file storage and emits its content downstream.

Link copied to clipboard
@Serializable
@SerialName(value = "ListFiles")
data class ListFilesEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val directory: String) : EventSchema

Lists the files directly inside directory in the client's own file storage; subdirectories and the files inside them are skipped. Each returned path is relative to the storage root — the same form GetFile and DeleteFiles take as fileName — so it can be passed straight to them. Not recursive.

Link copied to clipboard
@Serializable
@SerialName(value = "OpenFilePicker")
data class OpenFilePickerEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val fileType: OpenFilePickerEventSchema.FileType, val pickMode: OpenFilePickerEventSchema.PickMode, val outputType: FileOutputType = FileOutputType.PlatformFile) : EventSchema

Opens the platform file picker and emits the chosen file downstream.

Link copied to clipboard
@Serializable
@SerialName(value = "SaveFile")
data class SaveFileEventSchema(val id: String, val trigger: EventTrigger, val events: SerializableImmutableList<EventSchema>?, val fileName: String, val overrideIfExists: Boolean) : EventSchema

Writes the event's incomingData to fileName in the client's own file storage.