Class Paths
Helper methods for resolving file system paths.
Namespace: NanoByte.Common.Storage
Assembly: NanoByte.Common.dll
Syntax
public static class Paths : Object
Methods
ResolveFiles(IEnumerable<String>, String)
Resolves paths to absolute file paths with wildcard support.
Declaration
public static IList<FileInfo> ResolveFiles(IEnumerable<string> paths, string defaultPattern = "*")
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<String> | paths | The paths to resolve. |
String | defaultPattern | The default pattern to use for finding files when a directory is specified. |
Returns
Type | Description |
---|---|
IList<FileInfo> | Handles to all matching files that were found |
Remarks
paths
are first interpreted as files, then as directories. Directories are searched using the defaultPattern
. * and ? characters are considered as wildcards.
Exceptions
Type | Condition |
---|---|
FileNotFoundException | A file that was explicitly specified in |