RunicDroppedFile record

Namespace Runic.Application.Views in Runic.Application.Views 0.23.0

public sealed record RunicDroppedFile : IEquatable<RunicDroppedFile>

Inherits or implements IEquatable.

A file or directory dropped onto a Window.

Parameters

Path

The absolute local path, from the native window. In a Flatpak sandbox it is a document-portal path under /run/user/<uid>/doc; in a macOS App Sandbox the drop grants access while the application runs.

IsDirectory

Whether the path was a directory when it was dropped.

Constructors

RunicDroppedFile

public RunicDroppedFile(string Path, bool IsDirectory)

A file or directory dropped onto a Window.

Parameters

Path

The absolute local path, from the native window. In a Flatpak sandbox it is a document-portal path under /run/user/<uid>/doc; in a macOS App Sandbox the drop grants access while the application runs.

IsDirectory

Whether the path was a directory when it was dropped.

Properties

IsDirectory

public bool IsDirectory { get; init; }

Whether the path was a directory when it was dropped.

Name

public string Name { get; }

Gets the file or directory name, the last segment of RunicDroppedFile.Path.

Path

public string Path { get; init; }

The absolute local path, from the native window. In a Flatpak sandbox it is a document-portal path under /run/user/<uid>/doc; in a macOS App Sandbox the drop grants access while the application runs.

Methods

FromPath

public static RunicDroppedFile FromPath(string path)

Creates the description of a dropped path, reading whether it is a directory.

Parameters

path

The absolute local path.

Exceptions

ArgumentException

path is empty or not absolute.