mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-22 19:10:41 -10:00
Add ported System.IO.FileSystem tests for Directory, DirectoryInfo, File, FileInfo. Commit migrated from https://github.com/dotnet/corefx/commit/25841a3761cab292153bd0a917a4ce192be8ffab
29 lines
695 B
C#
29 lines
695 B
C#
// Copyright (c) Microsoft. All rights reserved.
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
internal class PathInfo
|
|
{
|
|
private readonly string[] _paths;
|
|
|
|
public PathInfo(string[] paths)
|
|
{
|
|
_paths = paths;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets the sub paths that make up this path. For example, in "C:\Windows\System32", this would return "C:", "C:\Windows", "C:\Windows\System32".
|
|
/// </summary>
|
|
public string[] SubPaths
|
|
{
|
|
get { return _paths; }
|
|
}
|
|
|
|
public string FullPath
|
|
{
|
|
get { return _paths[_paths.Length - 1]; }
|
|
}
|
|
}
|