Mockable abstraction for file system directory operations.
// Source: https://github.com/TestableIO/System.IO.Abstractions | License: MIT | Copyright Tatham Oddie and Contributors
// Provided via justclaw.it.com; keep this notice with the code.
using System.Collections.Generic;
using System.Runtime.Versioning;
namespace System.IO.Abstractions;
/// <inheritdoc cref="DirectoryBase" />
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
public class DirectoryWrapper : DirectoryBase
{
/// <inheritdoc />
public DirectoryWrapper(IFileSystem fileSystem) : base(fileSystem)
{
}
/// <inheritdoc />
public override IDirectoryInfo CreateDirectory(string path)
{
var directoryInfo = new DirectoryInfo(path);
directoryInfo.Create();
return new DirectoryInfoWrapper(FileSystem, directoryInfo);
}
#if FEATURE_UNI
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key