EmbedFile

open class EmbedFile(val name: String, val parent: EmbedFolder, val contents: ByteArray) : EmbedFileEntity(source)

A virtual file in the file tree

Since

0.1.0

Constructors

Link copied to clipboard
constructor(name: String, parent: EmbedFolder, contents: ByteArray)

Properties

Link copied to clipboard

The contents of the file

Link copied to clipboard
open override val isDirectory: Boolean

If the entity is a folder

Link copied to clipboard
open override val isFile: Boolean

If the entity is a file

Link copied to clipboard
override val name: String

The name of the file

Link copied to clipboard
override val parent: EmbedFolder

The parent of the file

Link copied to clipboard
open override val path: String

The path of the file

Functions

Link copied to clipboard

Get the contents of the file as a byte array

Link copied to clipboard

Get the contents of the file as a string

Link copied to clipboard

Get the contents of the file as a counting input stream

Link copied to clipboard

Get the contents of the file as a data input stream

Link copied to clipboard

Get the contents of the file as a stream

Link copied to clipboard

Get the contents of the file as a stream

Link copied to clipboard
open fun toFile(): EmbedFile

Convert the entity to a EmbedFile

Link copied to clipboard
open fun toFolder(): EmbedFolder

Convert the entity to a EmbedFolder