DesktopContent.Directory record

Namespace Runic.Desktop in Runic.Desktop 0.23.0

public sealed record DesktopContent.Directory : DesktopContent, IEquatable<DesktopContent.Directory>

Nested in DesktopContent. Inherits or implements DesktopContent, IEquatable.

Serves the files in a local directory.

Parameters

Root

The directory, absolute or relative to the current directory. It must exist when the surface is created.

Entry

The file the presentation opens, relative to Root, such as index.html. When omitted, a request for a directory opens its index.html, index.htm, index.ts or index.js. The entry is a file path, not a URL: an entry with a ?query or #fragment throws a DesktopConfigurationException whose diagnostic code is content-entry-invalid.

Constructors

Directory

public Directory(string Root, string? Entry = null)

Serves the files in a local directory.

Parameters

Root

The directory, absolute or relative to the current directory. It must exist when the surface is created.

Entry

The file the presentation opens, relative to Root, such as index.html. When omitted, a request for a directory opens its index.html, index.htm, index.ts or index.js. The entry is a file path, not a URL: an entry with a ?query or #fragment throws a DesktopConfigurationException whose diagnostic code is content-entry-invalid.

Properties

Entry

public string? Entry { get; init; }

Gets the file the presentation opens, relative to Directory.Root, or null for index discovery.

Root

public string Root { get; init; }

Gets the directory, absolute or relative to the current directory.