Table of Contents

Class SafeName

Namespace
ZeroInstall.DesktopIntegration
Assembly
ZeroInstall.DesktopIntegration.dll

Helpers for validating safe names for files and aliases.

public static class SafeName
Inheritance
object
SafeName

Methods

IsValid(string?)

Indicates whether value is a valid safe name.

public static bool IsValid(string? value)

Parameters

value string

Returns

bool

Validate(string?)

Ensures that value is a valid safe name.

public static void Validate(string? value)

Parameters

value string

Exceptions

IOException

value is not a valid alias name.

ValidatePath(string)

Ensures that value is a relative path consisting only of valid safe names, separated by slashes or backslashes.

public static void ValidatePath(string value)

Parameters

value string

Exceptions

IOException

A segment of value is empty or not a valid safe name.