FileSystemEntry

Provides a common interface for files and directories in a filesystem.

Inheritors

Types

Link copied to clipboard
data class File(val name: String, val extension: String?, val path: String, val hidden: Boolean, val size: List<FileSize>, val contentType: FileMetadata.FileContentType, val content: FileSystemEntry.File.Content = Content.None) : FileSystemEntry

Represents a file in the filesystem.

Link copied to clipboard
data class Folder(val name: String, val path: String, val hidden: Boolean, val entries: List<FileSystemEntry>? = null) : FileSystemEntry

Represents a folder in a filesystem.

Properties

Link copied to clipboard
abstract val extension: String?

Represents the optional file extension of the file system entry.

Link copied to clipboard
abstract val hidden: Boolean

Indicates whether the file system entry is hidden.

Link copied to clipboard
abstract val name: String

Represents the name as a string value. This variable is typically used to hold textual data corresponding to a name.

Link copied to clipboard
abstract val path: String

Represents a filesystem or resource path.

Functions

Link copied to clipboard
abstract suspend fun visit(depth: Int, visitor: suspend (FileSystemEntry) -> Unit)

Visits this entry and its descendants in depth-first order.