Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​IO.​Enumeration.​FileSystemName

Assembly: System.Runtime

Inheritance: object → FileSystemName

Provides methods for matching file system names.

Methods

public static bool
MatchesSimpleExpression​(ReadOnlySpan<​char> expression, ReadOnlySpan<​char> name, bool ignoreCase = true)
Verifies if the given expression matches the given name. Supports the following wildcards: '*' and '?'. The backslash character '\' escapes.
Returns <see langword="true" /> if the given expression matches the given name; otherwise, <see langword="false" /> .
expression The expression to match with.
name The name to check against the expression.
ignoreCase <see langword="true" /> to ignore case (default); <see langword="false" /> if the match should be case-sensitive.
public static bool
MatchesWin32Expression​(ReadOnlySpan<​char> expression, ReadOnlySpan<​char> name, bool ignoreCase = true)
Verifies if the given Win32 expression matches the given name. Supports the following wildcards: '*', '?', '&lt;', '&gt;', '"'. The backslash character '\' escapes.
Returns <see langword="true" /> if the given expression matches the given name; otherwise, <see langword="false" /> .
expression The expression to match with, such as "*.foo".
name The name to check against the expression.
ignoreCase <see langword="true" /> to ignore case (default), <see langword="false" /> if the match should be case-sensitive.
public static string
TranslateWin32Expression​(string expression)
Translates the given Win32 expression. Change '*' and '?' to '&lt;', '&gt;' and '"' to match Win32 behavior.
Returns A string with the translated Win32 expression.
expression The expression to translate.
public bool
Equals​(object obj)
Inherited from object
Determines whether the specified object is equal to the current object.
Returns <see langword="true" /> if the specified object is equal to the current object; otherwise, <see langword="false" /> .
obj The object to compare with the current object.
protected void
Finalize​()
Inherited from object
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
public int
GetHashCode​()
Inherited from object
Serves as the default hash function.
Returns A hash code for the current object.
public Type
GetType​()
Inherited from object
Gets the <see cref="T:System.Type" /> of the current instance.
Returns The exact runtime type of the current instance.
protected object
MemberwiseClone​()
Inherited from object
Creates a shallow copy of the current <see cref="T:System.Object" /> .
Returns A shallow copy of the current <see cref="T:System.Object" /> .
public string
ToString​()
Inherited from object
Returns a string that represents the current object.
Returns A string that represents the current object.