Table of Contents

Class Paths

Namespace
NanoByte.Common.Storage
Assembly
NanoByte.Common.dll

Helper methods for resolving file system paths.

public static class Paths
Inheritance
object
Paths

Methods

ResolveFiles(IEnumerable<string>, string)

Resolves paths to absolute file paths with wildcard support.

public static IList<FileInfo> ResolveFiles(IEnumerable<string> paths, string defaultPattern = "*")

Parameters

paths IEnumerable<string>

The paths to resolve.

defaultPattern string

The default pattern to use for finding files when a directory is specified.

Returns

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

FileNotFoundException

A file that was explicitly specified in paths (no wildcards) could not be found.