EmbedFolder

open class EmbedFolder(val name: String, val parent: EmbedFolder?, files: Map<String, EmbedFileEntity>) : EmbedFileEntity(source)

A virtual folder in the file tree

Since

0.1.0

Constructors

Link copied to clipboard
constructor(name: String, parent: EmbedFolder?, files: Map<String, EmbedFileEntity>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The children of the folder (mutable variant of files)

Link copied to clipboard

The files in the folder (immutable variant of children)

Link copied to clipboard
open override val isDirectory: Boolean

The folders in the folder (immutable variant of children)

Link copied to clipboard
open override val isFile: Boolean

The folders in the folder (immutable variant of children)

Link copied to clipboard
override val name: String

The name of the folder

Link copied to clipboard
override val parent: EmbedFolder?

The parent of the folder

Link copied to clipboard
open override val path: String

The folders in the folder (immutable variant of children)

Functions

Link copied to clipboard

Get a list of all files in the folder (recursive)

Link copied to clipboard
fun forEachFile(action: (EmbedFile) -> Unit)

Iterate over all files in the folder (recursive)

Link copied to clipboard
operator fun get(path: String): EmbedFileEntity?

Get a file from the folder

Link copied to clipboard
Link copied to clipboard
fun globFiles(pattern: String): List<EmbedFile>
Link copied to clipboard
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