Folder

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

Represents a folder in a filesystem.

A folder is a directory that can contain other entries, including files and subfolders. This class implements FileSystemEntry and includes metadata and optional child entries.

Constructors

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

Properties

Link copied to clipboard

the list of child entries (files and folders), or null if not specified

Link copied to clipboard
open override val extension: String? = null

Always null since directories have no file extensions.

Link copied to clipboard
open override val hidden: Boolean

whether the folder is hidden

Link copied to clipboard
open override val name: String

the name of the folder

Link copied to clipboard
open override val path: String

the absolute path to the folder

Functions

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

Visits this folder and its descendants up to the specified depth.