Table of Contents

Class FileExtensionCollection

Namespace
Stride.Core.Assets.IO
Assembly
Stride.Core.Assets.dll

A class describing a collection of file extensions, with a facultative description string.

public sealed class FileExtensionCollection
Inheritance
FileExtensionCollection

Constructors

FileExtensionCollection(string)

Initializes a new instance of the FileExtensionCollection class.

public FileExtensionCollection(string extensions)

Parameters

extensions string

The extensions to add in this collection. Extensions must be separated with the semi-colon character (;).

FileExtensionCollection(string, string, params string[])

Initializes a new instance of the FileExtensionCollection class.

public FileExtensionCollection(string description, string extensions, params string[] additionalExtensions)

Parameters

description string

The description of this file extension collection. Can be null.

extensions string

The extensions to add in this collection. Extensions must be separated with the semi-colon character (;).

additionalExtensions string[]

Additional extensions to add in this collection. Extensions inside each string must be separated with the semi-colon character (;).

Properties

ConcatenatedExtensions

Gets a string containing all extensions separated with the semi-colon character (;).

public string ConcatenatedExtensions { get; }

Property Value

string

Description

Gets the description of this file extension collection.

public string Description { get; }

Property Value

string

SingleExtensions

Gets each extension in this collection individually splitted in an IEnumerable<T>.

public IEnumerable<string> SingleExtensions { get; }

Property Value

IEnumerable<string>

Methods

Contains(string)

Indicates whether the given extension matches any of the extension in this collection.

public bool Contains(string extension)

Parameters

extension string

The extension to match. Can contain wildcards.

Returns

bool

True if the given extension matches, false otherwise.