diff --git a/Directory.Packages.props b/Directory.Packages.props
index d0c048ddb..7026a0bbf 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -7,6 +7,7 @@
+
diff --git a/System.IO.Abstractions.sln b/System.IO.Abstractions.sln
index cc1d4ec7a..3ec9ec636 100644
--- a/System.IO.Abstractions.sln
+++ b/System.IO.Abstractions.sln
@@ -90,6 +90,7 @@ Global
{919888D2-E37D-40E7-8AD0-600F9429316D} = {BCEC61BD-4941-41EC-975A-ACEFC7AC1780}
{2BE9161B-A3F3-4511-81DB-DB1DCB6375C9} = {BBF7AD8D-5522-48C0-A906-00CBB72308A0}
{D905E09D-6DC3-4F7C-8E83-82FADAE2C9E5} = {2BE9161B-A3F3-4511-81DB-DB1DCB6375C9}
+ {1B8388D2-58A7-47B8-89EC-C5A94A0FEED5} = {C078E0B6-9747-475F-A999-B9E775DF6643}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8885C59C-F6A0-4C2F-A3BC-B720E9BD161F}
diff --git a/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj b/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj
index 60955347d..054dc6360 100644
--- a/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj
+++ b/src/TestableIO.System.IO.Abstractions.TestingHelpers/TestableIO.System.IO.Abstractions.TestingHelpers.csproj
@@ -7,7 +7,7 @@
icon_256x256.png
-
+
diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj b/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj
index e929acf0c..70fbb0779 100644
--- a/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj
+++ b/src/TestableIO.System.IO.Abstractions.Wrappers/TestableIO.System.IO.Abstractions.Wrappers.csproj
@@ -19,6 +19,6 @@
-
+
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/FileSystemStream.cs b/src/TestableIO.System.IO.Abstractions/FileSystemStream.cs
deleted file mode 100644
index c8553e740..000000000
--- a/src/TestableIO.System.IO.Abstractions/FileSystemStream.cs
+++ /dev/null
@@ -1,269 +0,0 @@
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.IO.Abstractions
-{
- ///
- /// Wrapper around a which is used as a replacement
- /// for a . As such it implements the same
- /// properties and methods as a .
- ///
- public abstract class FileSystemStream : Stream
- {
- ///
- public override bool CanRead
- => _stream.CanRead;
-
- ///
- public override bool CanSeek
- => _stream.CanSeek;
-
- ///
- public override bool CanTimeout
- => _stream.CanTimeout;
-
- ///
- public override bool CanWrite
- => _stream.CanWrite;
-
- ///
- public virtual bool IsAsync { get; }
-
- ///
- public override long Length
- => _stream.Length;
-
- ///
- public virtual string Name { get; }
-
- ///
- public override long Position
- {
- get => _stream.Position;
- set => _stream.Position = value;
- }
-
- ///
- public override int ReadTimeout
- {
- get => _stream.ReadTimeout;
- set => _stream.ReadTimeout = value;
- }
-
- ///
- public override int WriteTimeout
- {
- get => _stream.WriteTimeout;
- set => _stream.WriteTimeout = value;
- }
-
- private readonly Stream _stream;
-
- ///
- /// Initializes a new instance of .
- ///
- /// The wrapped .
- /// The of the stream.
- ///
- /// The flag, indicating if the was
- /// opened asynchronously or synchronously.
- ///
- protected FileSystemStream(Stream stream, string path, bool isAsync)
- {
- if (path is null)
- {
- throw new ArgumentNullException(nameof(path), "Path cannot be null.");
- }
-
- if (path.Length == 0)
- {
- throw new ArgumentException("Empty path name is not legal.", nameof(path));
- }
-
- _stream = stream;
- Name = path;
- IsAsync = isAsync;
- }
-
- ///
- public override IAsyncResult BeginRead(byte[] buffer,
- int offset,
- int count,
- AsyncCallback? callback,
- object? state)
- => _stream.BeginRead(buffer, offset, count, callback, state);
-
- ///
- public override IAsyncResult BeginWrite(byte[] buffer,
- int offset,
- int count,
- AsyncCallback? callback,
- object? state)
- => _stream.BeginWrite(buffer, offset, count, callback, state);
-
- ///
- public override void Close()
- {
- base.Close();
- _stream.Close();
- }
-
- ///
-#if NETSTANDARD2_0 || NET462
- public new virtual void CopyTo(Stream destination, int bufferSize)
-#else
- public override void CopyTo(Stream destination, int bufferSize)
-#endif
- {
- ValidateCopyToArguments(this, destination, bufferSize);
- _stream.CopyTo(destination, bufferSize);
- }
-
- ///
- public override Task CopyToAsync(Stream destination,
- int bufferSize,
- CancellationToken cancellationToken)
- {
- ValidateCopyToArguments(this, destination, bufferSize);
- return _stream.CopyToAsync(destination, bufferSize, cancellationToken);
- }
-
- ///
- public override int EndRead(IAsyncResult asyncResult)
- => _stream.EndRead(asyncResult);
-
- ///
- public override void EndWrite(IAsyncResult asyncResult)
- => _stream.EndWrite(asyncResult);
-
- ///
- public override void Flush()
- => _stream.Flush();
-
- ///
- public virtual void Flush(bool flushToDisk)
- => _stream.Flush();
-
- ///
- public override Task FlushAsync(CancellationToken cancellationToken)
- => _stream.FlushAsync(cancellationToken);
-
- ///
- public override int Read(byte[] buffer, int offset, int count)
- => _stream.Read(buffer, offset, count);
-
-#if FEATURE_SPAN
- ///
- public override int Read(Span buffer)
- => _stream.Read(buffer);
-#endif
-
- ///
- public override Task ReadAsync(byte[] buffer,
- int offset,
- int count,
- CancellationToken cancellationToken)
- => _stream.ReadAsync(buffer, offset, count, cancellationToken);
-
-#if FEATURE_SPAN
- ///
- public override ValueTask ReadAsync(Memory buffer,
- CancellationToken cancellationToken = new())
- => _stream.ReadAsync(buffer, cancellationToken);
-#endif
-
- ///
- public override int ReadByte()
- => _stream.ReadByte();
-
- ///
- public override long Seek(long offset, SeekOrigin origin)
- => _stream.Seek(offset, origin);
-
- ///
- public override void SetLength(long value)
- => _stream.SetLength(value);
-
- ///
- public override string? ToString()
- => _stream.ToString();
-
- ///
- public override void Write(byte[] buffer, int offset, int count)
- => _stream.Write(buffer, offset, count);
-
-#if FEATURE_SPAN
- ///
- public override void Write(ReadOnlySpan buffer)
- => _stream.Write(buffer);
-#endif
-
- ///
- public override Task WriteAsync(byte[] buffer,
- int offset,
- int count,
- CancellationToken cancellationToken)
- => _stream.WriteAsync(buffer, offset, count, cancellationToken);
-
-#if FEATURE_SPAN
- ///
- public override ValueTask WriteAsync(ReadOnlyMemory buffer,
- CancellationToken cancellationToken = new())
- => _stream.WriteAsync(buffer, cancellationToken);
-#endif
-
- ///
- public override void WriteByte(byte value)
- => _stream.WriteByte(value);
-
- ///
- protected override void Dispose(bool disposing)
- {
- _stream.Dispose();
- base.Dispose(disposing);
- }
-
- ///
- /// Allows to cast the internal Stream to a FileStream
- ///
- /// The FileSystemStream to cast
- ///
- public static explicit operator FileStream(FileSystemStream fsStream)
- {
- return (FileStream) fsStream._stream;
- }
-
- private static void ValidateCopyToArguments(Stream source, Stream destination, int bufferSize)
- {
- if (destination == null)
- {
- throw new ArgumentNullException(nameof(destination), "Destination cannot be null.");
- }
-
- if (bufferSize <= 0)
- {
- throw new ArgumentOutOfRangeException(nameof(bufferSize), "Buffer size must be greater than zero.");
- }
-
- if (!destination.CanWrite)
- {
- if (destination.CanRead)
- {
- throw new NotSupportedException("Stream does not support writing.");
- }
-
- throw new ObjectDisposedException("Cannot access a closed Stream.");
- }
-
- if (!source.CanRead)
- {
- if (source.CanWrite)
- {
- throw new NotSupportedException("Stream does not support reading.");
- }
-
- throw new ObjectDisposedException("Cannot access a closed Stream.");
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IDirectory.cs b/src/TestableIO.System.IO.Abstractions/IDirectory.cs
deleted file mode 100644
index a922c4be5..000000000
--- a/src/TestableIO.System.IO.Abstractions/IDirectory.cs
+++ /dev/null
@@ -1,181 +0,0 @@
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.IO.Abstractions
-{
- ///
- /// Abstractions for .
- ///
- public interface IDirectory : IFileSystemEntity
- {
- ///
- IDirectoryInfo CreateDirectory(string path);
-
-#if FEATURE_UNIX_FILE_MODE
- ///
- IDirectoryInfo CreateDirectory(string path, UnixFileMode unixCreateMode);
-#endif
-
-#if FEATURE_CREATE_SYMBOLIC_LINK
- ///
- IFileSystemInfo CreateSymbolicLink(string path, string pathToTarget);
-#endif
-
-#if FEATURE_CREATE_TEMP_SUBDIRECTORY
- ///
- IDirectoryInfo CreateTempSubdirectory(string? prefix = null);
-#endif
-
- ///
- void Delete(string path);
-
- ///
- void Delete(string path, bool recursive);
-
- ///
- IEnumerable EnumerateDirectories(string path);
-
- ///
- IEnumerable EnumerateDirectories(string path, string searchPattern);
-
- ///
- IEnumerable EnumerateDirectories(string path, string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IEnumerable EnumerateDirectories(string path, string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IEnumerable EnumerateFiles(string path);
-
- ///
- IEnumerable EnumerateFiles(string path, string searchPattern);
-
- ///
- IEnumerable EnumerateFiles(string path, string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IEnumerable EnumerateFiles(string path, string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IEnumerable EnumerateFileSystemEntries(string path);
-
- ///
- IEnumerable EnumerateFileSystemEntries(string path, string searchPattern);
-
- ///
- IEnumerable EnumerateFileSystemEntries(string path, string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IEnumerable EnumerateFileSystemEntries(string path, string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- bool Exists([NotNullWhen(true)] string? path);
-
- ///
- DateTime GetCreationTime(string path);
-
- ///
- DateTime GetCreationTimeUtc(string path);
-
- ///
- string GetCurrentDirectory();
-
- ///
- string[] GetDirectories(string path);
-
- ///
- string[] GetDirectories(string path, string searchPattern);
-
- ///
- string[] GetDirectories(string path, string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- string[] GetDirectories(string path, string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- string GetDirectoryRoot(string path);
-
- ///
- string[] GetFiles(string path);
-
- ///
- string[] GetFiles(string path, string searchPattern);
-
- ///
- string[] GetFiles(string path, string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- string[] GetFiles(string path, string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- string[] GetFileSystemEntries(string path);
-
- ///
- string[] GetFileSystemEntries(string path, string searchPattern);
-
- ///
- string[] GetFileSystemEntries(string path, string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- string[] GetFileSystemEntries(string path, string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- DateTime GetLastAccessTime(string path);
-
- ///
- DateTime GetLastAccessTimeUtc(string path);
-
- ///
- DateTime GetLastWriteTime(string path);
-
- ///
- DateTime GetLastWriteTimeUtc(string path);
-
- ///
- string[] GetLogicalDrives();
-
- ///
- IDirectoryInfo? GetParent(string path);
-
- ///
- void Move(string sourceDirName, string destDirName);
-
-#if FEATURE_CREATE_SYMBOLIC_LINK
- ///
- IFileSystemInfo? ResolveLinkTarget(string linkPath, bool returnFinalTarget);
-#endif
-
- ///
- void SetCreationTime(string path, DateTime creationTime);
-
- ///
- void SetCreationTimeUtc(string path, DateTime creationTimeUtc);
-
- ///
- void SetCurrentDirectory(string path);
-
- ///
- void SetLastAccessTime(string path, DateTime lastAccessTime);
-
- ///
- void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc);
-
- ///
- void SetLastWriteTime(string path, DateTime lastWriteTime);
-
- ///
- void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc);
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IDirectoryInfo.cs b/src/TestableIO.System.IO.Abstractions/IDirectoryInfo.cs
deleted file mode 100644
index 93fa0f2ab..000000000
--- a/src/TestableIO.System.IO.Abstractions/IDirectoryInfo.cs
+++ /dev/null
@@ -1,110 +0,0 @@
-using System.Collections.Generic;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IDirectoryInfo : IFileSystemInfo
- {
- ///
- IDirectoryInfo? Parent { get; }
-
- ///
- IDirectoryInfo Root { get; }
-
- ///
- void Create();
-
- ///
- IDirectoryInfo CreateSubdirectory(string path);
-
- ///
- void Delete(bool recursive);
-
- ///
- IEnumerable EnumerateDirectories();
-
- ///
- IEnumerable EnumerateDirectories(string searchPattern);
-
- ///
- IEnumerable EnumerateDirectories(string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IEnumerable EnumerateDirectories(string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IEnumerable EnumerateFiles();
-
- ///
- IEnumerable EnumerateFiles(string searchPattern);
-
- ///
- IEnumerable EnumerateFiles(string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IEnumerable EnumerateFiles(string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IEnumerable EnumerateFileSystemInfos();
-
- ///
- IEnumerable EnumerateFileSystemInfos(string searchPattern);
-
- ///
- IEnumerable EnumerateFileSystemInfos(string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IEnumerable EnumerateFileSystemInfos(string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IDirectoryInfo[] GetDirectories();
-
- ///
- IDirectoryInfo[] GetDirectories(string searchPattern);
-
- ///
- IDirectoryInfo[] GetDirectories(string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IDirectoryInfo[] GetDirectories(string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IFileInfo[] GetFiles();
-
- ///
- IFileInfo[] GetFiles(string searchPattern);
-
- ///
- IFileInfo[] GetFiles(string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IFileInfo[] GetFiles(string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- IFileSystemInfo[] GetFileSystemInfos();
-
- ///
- IFileSystemInfo[] GetFileSystemInfos(string searchPattern);
-
- ///
- IFileSystemInfo[] GetFileSystemInfos(string searchPattern, SearchOption searchOption);
-
-#if FEATURE_ENUMERATION_OPTIONS
- ///
- IFileSystemInfo[] GetFileSystemInfos(string searchPattern, EnumerationOptions enumerationOptions);
-#endif
-
- ///
- void MoveTo(string destDirName);
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IDirectoryInfoFactory.cs b/src/TestableIO.System.IO.Abstractions/IDirectoryInfoFactory.cs
deleted file mode 100644
index 988bf53d0..000000000
--- a/src/TestableIO.System.IO.Abstractions/IDirectoryInfoFactory.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.IO.Abstractions
-{
- ///
- /// A factory for the creation of wrappers for in a .
- ///
- public interface IDirectoryInfoFactory : IFileSystemEntity
- {
- ///
- /// Initializes a new instance of a wrapper for which implements .
- ///
- /// A string specifying the path on which to create the .
- IDirectoryInfo New(string path);
-
- ///
- /// Wraps the in a wrapper for which implements .
- ///
- [return: NotNullIfNotNull("directoryInfo")]
- IDirectoryInfo? Wrap(DirectoryInfo? directoryInfo);
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IDriveInfo.cs b/src/TestableIO.System.IO.Abstractions/IDriveInfo.cs
deleted file mode 100644
index 4b13684aa..000000000
--- a/src/TestableIO.System.IO.Abstractions/IDriveInfo.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-using System.Runtime.Versioning;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IDriveInfo : IFileSystemEntity
- {
- ///
- long AvailableFreeSpace { get; }
-
- ///
- string DriveFormat { get; }
-
- ///
- DriveType DriveType { get; }
-
- ///
- bool IsReady { get; }
-
- ///
- string Name { get; }
-
- ///
- IDirectoryInfo RootDirectory { get; }
-
- ///
- long TotalFreeSpace { get; }
-
- ///
- long TotalSize { get; }
-
- ///
- [AllowNull]
- string VolumeLabel
- {
- get;
- [SupportedOSPlatform("windows")] set;
- }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IDriveInfoFactory.cs b/src/TestableIO.System.IO.Abstractions/IDriveInfoFactory.cs
deleted file mode 100644
index 080a9f57e..000000000
--- a/src/TestableIO.System.IO.Abstractions/IDriveInfoFactory.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.IO.Abstractions
-{
- ///
- /// A factory for the creation of wrappers for in a .
- ///
- public interface IDriveInfoFactory : IFileSystemEntity
- {
- ///
- /// Retrieves the drive names of all logical drives on a computer.
- ///
- /// An array of type that represents the logical drives on a computer.
- IDriveInfo[] GetDrives();
-
- ///
- /// Provides access to the information on the specified drive.
- ///
- ///
- /// A valid drive path or drive letter.
- /// This can be either uppercase or lowercase, 'a' to 'z'.
- /// A value is not valid.
- ///
- IDriveInfo New(string driveName);
-
- ///
- /// Wraps the in a wrapper for which implements .
- ///
- [return: NotNullIfNotNull("driveInfo")]
- IDriveInfo? Wrap(DriveInfo? driveInfo);
- }
-}
diff --git a/src/TestableIO.System.IO.Abstractions/IFile.Async.cs b/src/TestableIO.System.IO.Abstractions/IFile.Async.cs
deleted file mode 100644
index 0571d71dc..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFile.Async.cs
+++ /dev/null
@@ -1,143 +0,0 @@
-#if FEATURE_ASYNC_FILE
-
-using System.Collections.Generic;
-using System.Text;
-using System.Threading.Tasks;
-using System.Threading;
-
-namespace System.IO.Abstractions
-{
- partial interface IFile
- {
-#if FEATURE_FILE_SPAN
- ///
- Task AppendAllBytesAsync(string path,
- byte[] bytes,
- CancellationToken cancellationToken = default);
-
- ///
- Task AppendAllBytesAsync(string path,
- ReadOnlyMemory bytes,
- CancellationToken cancellationToken = default);
-#endif
-
- ///
- Task AppendAllLinesAsync(string path,
- IEnumerable contents,
- CancellationToken cancellationToken = default);
-
- ///
- Task AppendAllLinesAsync(string path,
- IEnumerable contents,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-
- ///
- Task AppendAllTextAsync(string path,
- string? contents,
- CancellationToken cancellationToken = default);
-
- ///
- Task AppendAllTextAsync(string path,
- string? contents,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-
-#if FEATURE_FILE_SPAN
- ///
- Task AppendAllTextAsync(string path,
- ReadOnlyMemory contents,
- CancellationToken cancellationToken = default);
-
- ///
- Task AppendAllTextAsync(string path,
- ReadOnlyMemory contents,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-#endif
-
- ///
- Task ReadAllBytesAsync(string path,
- CancellationToken cancellationToken = default);
-
- ///
- Task ReadAllLinesAsync(string path,
- CancellationToken cancellationToken = default);
-
- ///
- Task ReadAllLinesAsync(string path,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-
- ///
- Task ReadAllTextAsync(string path,
- CancellationToken cancellationToken = default);
-
- ///
- Task ReadAllTextAsync(string path,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-
-#if FEATURE_READ_LINES_ASYNC
- ///
- IAsyncEnumerable ReadLinesAsync(string path,
- CancellationToken cancellationToken =
- default);
-
- ///
- IAsyncEnumerable ReadLinesAsync(string path, Encoding encoding,
- CancellationToken cancellationToken =
- default);
-#endif
-
-
- ///
- Task WriteAllBytesAsync(string path,
- byte[] bytes,
- CancellationToken cancellationToken = default);
-
-#if FEATURE_FILE_SPAN
- ///
- Task WriteAllBytesAsync(string path,
- ReadOnlyMemory bytes,
- CancellationToken cancellationToken = default);
-#endif
-
- ///
- Task WriteAllLinesAsync(string path,
- IEnumerable contents,
- CancellationToken cancellationToken = default);
-
- ///
- Task WriteAllLinesAsync(string path,
- IEnumerable contents,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-
- ///
- Task WriteAllTextAsync(string path,
- string? contents,
- CancellationToken cancellationToken = default);
-
- ///
- Task WriteAllTextAsync(string path,
- string? contents,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-
-#if FEATURE_FILE_SPAN
- ///
- Task WriteAllTextAsync(string path,
- ReadOnlyMemory contents,
- CancellationToken cancellationToken = default);
-
- ///
- Task WriteAllTextAsync(string path,
- ReadOnlyMemory contents,
- Encoding encoding,
- CancellationToken cancellationToken = default);
-#endif
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFile.cs b/src/TestableIO.System.IO.Abstractions/IFile.cs
deleted file mode 100644
index e7b029ac1..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFile.cs
+++ /dev/null
@@ -1,333 +0,0 @@
-using Microsoft.Win32.SafeHandles;
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Runtime.Versioning;
-using System.Text;
-
-namespace System.IO.Abstractions
-{
- ///
- /// Abstractions for .
- ///
-#if FEATURE_ASYNC_FILE
- public partial interface IFile : IFileSystemEntity
-#else
- public interface IFile : IFileSystemEntity
-#endif
- {
-#if FEATURE_FILE_SPAN
- ///
- void AppendAllBytes(string path,
- byte[] bytes);
-
- ///
- void AppendAllBytes(string path,
- ReadOnlySpan bytes);
-#endif
-
- ///
- void AppendAllLines(string path, IEnumerable contents);
-
- ///
- void AppendAllLines(string path, IEnumerable contents, Encoding encoding);
-
- ///
- void AppendAllText(string path, string? contents);
-
- ///
- void AppendAllText(string path, string? contents, Encoding encoding);
-
-#if FEATURE_FILE_SPAN
- ///
- void AppendAllText(string path,
- ReadOnlySpan contents);
-
- ///
- void AppendAllText(string path,
- ReadOnlySpan contents,
- Encoding encoding);
-#endif
-
- ///
- StreamWriter AppendText(string path);
-
- ///
- void Copy(string sourceFileName, string destFileName);
-
- ///
- void Copy(string sourceFileName, string destFileName, bool overwrite);
-
- ///
- FileSystemStream Create(string path);
-
- ///
- FileSystemStream Create(string path, int bufferSize);
-
- ///
- FileSystemStream Create(string path, int bufferSize, FileOptions options);
-
-#if FEATURE_CREATE_SYMBOLIC_LINK
- ///
- IFileSystemInfo CreateSymbolicLink(string path, string pathToTarget);
-#endif
- ///
- StreamWriter CreateText(string path);
-
- ///
- [SupportedOSPlatform("windows")]
- void Decrypt(string path);
-
- ///
- void Delete(string path);
-
- ///
- [SupportedOSPlatform("windows")]
- void Encrypt(string path);
-
- ///
- bool Exists([NotNullWhen(true)] string? path);
-
- ///
- FileAttributes GetAttributes(string path);
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- FileAttributes GetAttributes(SafeFileHandle fileHandle);
-#endif
-
- ///
- DateTime GetCreationTime(string path);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- DateTime GetCreationTime(SafeFileHandle fileHandle);
-#endif
-
- ///
- DateTime GetCreationTimeUtc(string path);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- DateTime GetCreationTimeUtc(SafeFileHandle fileHandle);
-#endif
-
- ///
- DateTime GetLastAccessTime(string path);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- DateTime GetLastAccessTime(SafeFileHandle fileHandle);
-#endif
-
- ///
- DateTime GetLastAccessTimeUtc(string path);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- DateTime GetLastAccessTimeUtc(SafeFileHandle fileHandle);
-#endif
-
- ///
- DateTime GetLastWriteTime(string path);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- DateTime GetLastWriteTime(SafeFileHandle fileHandle);
-#endif
-
- ///
- DateTime GetLastWriteTimeUtc(string path);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- DateTime GetLastWriteTimeUtc(SafeFileHandle fileHandle);
-#endif
-
-#if FEATURE_UNIX_FILE_MODE
- ///
- [UnsupportedOSPlatform("windows")]
- UnixFileMode GetUnixFileMode(string path);
-#endif
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- [UnsupportedOSPlatform("windows")]
- UnixFileMode GetUnixFileMode(SafeFileHandle fileHandle);
-#endif
-
- ///
- void Move(string sourceFileName, string destFileName);
-
-#if FEATURE_FILE_MOVE_WITH_OVERWRITE
- ///
- void Move(string sourceFileName, string destFileName, bool overwrite);
-#endif
-
- ///
- FileSystemStream Open(string path, FileMode mode);
-
- ///
- FileSystemStream Open(string path, FileMode mode, FileAccess access);
-
- ///
- FileSystemStream Open(string path, FileMode mode, FileAccess access,
- FileShare share);
-
-#if FEATURE_FILESTREAM_OPTIONS
- ///
- FileSystemStream Open(string path, FileStreamOptions options);
-#endif
-
- ///
- FileSystemStream OpenRead(string path);
-
- ///
- StreamReader OpenText(string path);
-
- ///
- FileSystemStream OpenWrite(string path);
-
- ///
- byte[] ReadAllBytes(string path);
-
- ///
- string[] ReadAllLines(string path);
-
- ///
- string[] ReadAllLines(string path, Encoding encoding);
-
- ///
- string ReadAllText(string path);
-
- ///
- string ReadAllText(string path, Encoding encoding);
-
-
- ///
- IEnumerable ReadLines(string path);
-
- ///
- IEnumerable ReadLines(string path, Encoding encoding);
-
- ///
- void Replace(string sourceFileName,
- string destinationFileName,
- string? destinationBackupFileName);
-
- ///
- void Replace(string sourceFileName,
- string destinationFileName,
- string? destinationBackupFileName,
- bool ignoreMetadataErrors);
-
-#if FEATURE_CREATE_SYMBOLIC_LINK
- ///
- IFileSystemInfo? ResolveLinkTarget(string linkPath, bool returnFinalTarget);
-#endif
-
- ///
- void SetAttributes(string path, FileAttributes fileAttributes);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetAttributes(SafeFileHandle fileHandle, FileAttributes fileAttributes);
-#endif
-
- ///
- void SetCreationTime(string path, DateTime creationTime);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetCreationTime(SafeFileHandle fileHandle, DateTime creationTime);
-#endif
-
- ///
- void SetCreationTimeUtc(string path, DateTime creationTimeUtc);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetCreationTimeUtc(SafeFileHandle fileHandle, DateTime creationTimeUtc);
-#endif
-
- ///
- void SetLastAccessTime(string path, DateTime lastAccessTime);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetLastAccessTime(SafeFileHandle fileHandle, DateTime lastAccessTime);
-#endif
-
- ///
- void SetLastAccessTimeUtc(string path, DateTime lastAccessTimeUtc);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetLastAccessTimeUtc(SafeFileHandle fileHandle, DateTime lastAccessTimeUtc);
-#endif
-
- ///
- void SetLastWriteTime(string path, DateTime lastWriteTime);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetLastWriteTime(SafeFileHandle fileHandle, DateTime lastWriteTime);
-#endif
-
- ///
- void SetLastWriteTimeUtc(string path, DateTime lastWriteTimeUtc);
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- void SetLastWriteTimeUtc(SafeFileHandle fileHandle, DateTime lastWriteTimeUtc);
-#endif
-
-#if FEATURE_UNIX_FILE_MODE
- ///
- [UnsupportedOSPlatform("windows")]
- void SetUnixFileMode(string path, UnixFileMode mode);
-#endif
-
-#if FEATURE_FILE_ATTRIBUTES_VIA_HANDLE
- ///
- [UnsupportedOSPlatform("windows")]
- void SetUnixFileMode(SafeFileHandle fileHandle, UnixFileMode mode);
-#endif
-
- ///
- void WriteAllBytes(string path, byte[] bytes);
-
-#if FEATURE_FILE_SPAN
- ///
- void WriteAllBytes(string path,
- ReadOnlySpan bytes);
-#endif
-
- ///
- void WriteAllLines(string path, string[] contents);
-
- ///
- void WriteAllLines(string path, IEnumerable contents);
-
- ///
- void WriteAllLines(string path, string[] contents, Encoding encoding);
-
- ///
- void WriteAllLines(string path, IEnumerable contents, Encoding encoding);
-
- ///
- void WriteAllText(string path, string? contents);
-
- ///
- void WriteAllText(string path, string? contents, Encoding encoding);
-
-#if FEATURE_FILE_SPAN
- ///
- void WriteAllText(string path,
- ReadOnlySpan contents);
-
- ///
- void WriteAllText(string path,
- ReadOnlySpan contents,
- Encoding encoding);
-#endif
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileInfo.cs b/src/TestableIO.System.IO.Abstractions/IFileInfo.cs
deleted file mode 100644
index 42e4cd5e6..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileInfo.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-using System.Runtime.Versioning;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IFileInfo : IFileSystemInfo
- {
- ///
- IDirectoryInfo? Directory { get; }
-
- ///
- string? DirectoryName { get; }
-
- ///
- bool IsReadOnly { get; set; }
-
- ///
- long Length { get; }
-
- ///
- public StreamWriter AppendText();
-
- ///
- IFileInfo CopyTo(string destFileName);
-
- ///
- IFileInfo CopyTo(string destFileName, bool overwrite);
-
- ///
- FileSystemStream Create();
-
- ///
- public StreamWriter CreateText();
-
- ///
- [SupportedOSPlatform("windows")]
- void Decrypt();
-
- ///
- [SupportedOSPlatform("windows")]
- void Encrypt();
-
- ///
- void MoveTo(string destFileName);
-
-#if FEATURE_FILE_MOVE_WITH_OVERWRITE
- ///
- void MoveTo(string destFileName, bool overwrite);
-#endif
-
- ///
- FileSystemStream Open(FileMode mode);
-
- ///
- FileSystemStream Open(FileMode mode, FileAccess access);
-
- ///
- FileSystemStream Open(FileMode mode, FileAccess access, FileShare share);
-
-#if FEATURE_FILESTREAM_OPTIONS
- ///
- FileSystemStream Open(FileStreamOptions options);
-#endif
-
- ///
- FileSystemStream OpenRead();
-
- ///
- public StreamReader OpenText();
-
- ///
- FileSystemStream OpenWrite();
-
- ///
- IFileInfo Replace(string destinationFileName,
- string? destinationBackupFileName);
-
- ///
- IFileInfo Replace(string destinationFileName,
- string? destinationBackupFileName,
- bool ignoreMetadataErrors);
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileInfoFactory.cs b/src/TestableIO.System.IO.Abstractions/IFileInfoFactory.cs
deleted file mode 100644
index 380d4373c..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileInfoFactory.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.IO.Abstractions
-{
- ///
- /// A factory for the creation of wrappers for in a .
- ///
- public interface IFileInfoFactory : IFileSystemEntity
- {
- ///
- /// Initializes a new instance of a wrapper for which implements .
- ///
- ///
- /// The fully qualified name of the new file, or the relative file name.
- /// Do not end the path with the directory separator character.
- ///
- IFileInfo New(string fileName);
-
- ///
- /// Wraps the in a wrapper for which implements .
- ///
- [return: NotNullIfNotNull("fileInfo")]
- IFileInfo? Wrap(FileInfo? fileInfo);
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileStreamFactory.cs b/src/TestableIO.System.IO.Abstractions/IFileStreamFactory.cs
deleted file mode 100644
index ea33d6cac..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileStreamFactory.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-using Microsoft.Win32.SafeHandles;
-
-namespace System.IO.Abstractions
-{
- ///
- /// A factory for the creation of wrappers for in a .
- ///
- public interface IFileStreamFactory : IFileSystemEntity
- {
- ///
- FileSystemStream New(SafeFileHandle handle, FileAccess access);
-
- ///
- FileSystemStream New(SafeFileHandle handle, FileAccess access, int bufferSize);
-
- ///
- FileSystemStream New(SafeFileHandle handle, FileAccess access, int bufferSize, bool isAsync);
-
- ///
- FileSystemStream New(string path, FileMode mode);
-
- ///
- FileSystemStream New(string path, FileMode mode, FileAccess access);
-
- ///
- FileSystemStream New(string path, FileMode mode, FileAccess access,
- FileShare share);
-
- ///
- FileSystemStream New(string path, FileMode mode, FileAccess access,
- FileShare share, int bufferSize);
-
- ///
- FileSystemStream New(string path, FileMode mode, FileAccess access,
- FileShare share, int bufferSize, bool useAsync);
-
- ///
- FileSystemStream New(string path, FileMode mode, FileAccess access,
- FileShare share, int bufferSize, FileOptions options);
-
-#if FEATURE_FILESTREAM_OPTIONS
- ///
- FileSystemStream New(string path, FileStreamOptions options);
-#endif
-
- ///
- /// Wraps the to the testable .
- ///
- FileSystemStream Wrap(FileStream fileStream);
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileSystem.cs b/src/TestableIO.System.IO.Abstractions/IFileSystem.cs
deleted file mode 100644
index bc56d6246..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileSystem.cs
+++ /dev/null
@@ -1,53 +0,0 @@
-namespace System.IO.Abstractions
-{
- ///
- /// Abstraction of the file system.
- ///
- public interface IFileSystem
- {
- ///
- /// Abstraction for static methods in .
- ///
- IDirectory Directory { get; }
-
- ///
- /// A factory for the creation of wrappers for .
- ///
- IDirectoryInfoFactory DirectoryInfo { get; }
-
- ///
- /// A factory for the creation of wrappers for .
- ///
- IDriveInfoFactory DriveInfo { get; }
-
- ///
- /// Abstraction for static methods in .
- ///
- IFile File { get; }
-
- ///
- /// A factory for the creation of wrappers for .
- ///
- IFileInfoFactory FileInfo { get; }
-
- ///
- /// A factory for the creation of wrappers for .
- ///
- IFileVersionInfoFactory FileVersionInfo { get; }
-
- ///
- /// A factory for the creation of wrappers for .
- ///
- IFileStreamFactory FileStream { get; }
-
- ///
- /// A factory for the creation of wrappers for .
- ///
- IFileSystemWatcherFactory FileSystemWatcher { get; }
-
- ///
- /// Abstraction for static methods and properties in .
- ///
- IPath Path { get; }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileSystemAclSupport.cs b/src/TestableIO.System.IO.Abstractions/IFileSystemAclSupport.cs
deleted file mode 100644
index e1f6079b0..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileSystemAclSupport.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-namespace System.IO.Abstractions
-{
- ///
- /// Support ACL functionality on file system instances.
- ///
- public interface IFileSystemAclSupport
- {
- ///
- /// Gets a access control object that encapsulates the access control list (ACL) entries for the file or directory in the file system.
- ///
- object GetAccessControl();
-
- ///
- /// Gets a access control object that encapsulates the access control list (ACL) entries for the file or directory in the file system.
- ///
- /// One of the values that specifies the type of access control list (ACL) information to receive.
- object GetAccessControl(AccessControlSections includeSections);
-
- ///
- /// Applies access control list (ACL) entries described by the object to the file or directory in the file system.
- ///
- void SetAccessControl(object value);
-
- ///
- /// Specifies which sections of a security descriptor to save or load.
- [Flags]
- public enum AccessControlSections
- {
- ///
- /// No sections.
- ///
- None = 0,
-
- ///
- /// The system access control list (SACL).
- ///
- Audit = 1,
-
- ///
- /// The discretionary access control list (DACL).
- ///
- Access = 2,
-
- ///
- /// The owner.
- ///
- Owner = 4,
-
- ///
- /// The primary group.
- ///
- Group = 8,
-
- ///
- /// The entire security descriptor.
- ///
- All = Group | Owner | Access | Audit
- }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileSystemEntity.cs b/src/TestableIO.System.IO.Abstractions/IFileSystemEntity.cs
deleted file mode 100644
index 53401b5f6..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileSystemEntity.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace System.IO.Abstractions
-{
- ///
- /// Interface to support implementing extension methods on top of nested interfaces.
- ///
- public interface IFileSystemEntity
- {
- ///
- /// Exposes the underlying file system implementation.
- ///
- /// This is useful for implementing extension methods.
- ///
- IFileSystem FileSystem { get; }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileSystemInfo.cs b/src/TestableIO.System.IO.Abstractions/IFileSystemInfo.cs
deleted file mode 100644
index 9850790d7..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileSystemInfo.cs
+++ /dev/null
@@ -1,80 +0,0 @@
-using System.Runtime.Versioning;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IFileSystemInfo
- {
- ///
- /// Exposes the underlying filesystem implementation. This is useful for implementing extension methods.
- ///
- ///
- /// The property is always a global object related to the global current directory.
- ///
- IFileSystem FileSystem { get; }
-
- ///
- FileAttributes Attributes { get; set; }
-
- ///
- DateTime CreationTime { get; set; }
-
- ///
- DateTime CreationTimeUtc { get; set; }
-
- ///
- bool Exists { get; }
-
- ///
- string Extension { get; }
-
- ///
- string FullName { get; }
-
- ///
- DateTime LastAccessTime { get; set; }
-
- ///
- DateTime LastAccessTimeUtc { get; set; }
-
- ///
- DateTime LastWriteTime { get; set; }
-
- ///
- DateTime LastWriteTimeUtc { get; set; }
-
-#if FEATURE_FILE_SYSTEM_INFO_LINK_TARGET
- ///
- string? LinkTarget { get; }
-#endif
-
- ///
- string Name { get; }
-
-#if FEATURE_UNIX_FILE_MODE
- ///
- UnixFileMode UnixFileMode
- {
- get;
- [UnsupportedOSPlatform("windows")]
- set;
- }
-#endif
-
-#if FEATURE_CREATE_SYMBOLIC_LINK
- ///
- void CreateAsSymbolicLink(string pathToTarget);
-#endif
-
- ///
- void Delete();
-
- ///
- void Refresh();
-
-#if FEATURE_CREATE_SYMBOLIC_LINK
- ///
- IFileSystemInfo? ResolveLinkTarget(bool returnFinalTarget);
-#endif
- }
-}
diff --git a/src/TestableIO.System.IO.Abstractions/IFileSystemWatcher.cs b/src/TestableIO.System.IO.Abstractions/IFileSystemWatcher.cs
deleted file mode 100644
index edd6af6c1..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileSystemWatcher.cs
+++ /dev/null
@@ -1,73 +0,0 @@
-using System.Collections.ObjectModel;
-using System.ComponentModel;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IFileSystemWatcher : IFileSystemEntity, IDisposable
- {
- ///
- IContainer? Container { get; }
-
- ///
- bool EnableRaisingEvents { get; set; }
-
- ///
- string Filter { get; set; }
-
-#if FEATURE_FILE_SYSTEM_WATCHER_FILTERS
- ///
- Collection Filters { get; }
-#endif
-
- ///
- bool IncludeSubdirectories { get; set; }
-
- ///
- int InternalBufferSize { get; set; }
-
- ///
- NotifyFilters NotifyFilter { get; set; }
-
- ///
- string Path { get; set; }
-
- ///
- ISite? Site { get; set; }
-
- ///
- ISynchronizeInvoke? SynchronizingObject { get; set; }
-
- ///
- event FileSystemEventHandler? Changed;
-
- ///
- event FileSystemEventHandler? Created;
-
- ///
- event FileSystemEventHandler? Deleted;
-
- ///
- event ErrorEventHandler? Error;
-
- ///
- event RenamedEventHandler? Renamed;
-
- ///
- void BeginInit();
-
- ///
- void EndInit();
-
- ///
- IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeType);
-
- ///
- IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, int timeout);
-
-#if FEATURE_FILE_SYSTEM_WATCHER_WAIT_WITH_TIMESPAN
- ///
- IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, TimeSpan timeout);
-#endif
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileSystemWatcherFactory.cs b/src/TestableIO.System.IO.Abstractions/IFileSystemWatcherFactory.cs
deleted file mode 100644
index bcb3fae0b..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileSystemWatcherFactory.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.IO.Abstractions
-{
- ///
- /// A factory for the creation of wrappers for in a .
- ///
- public interface IFileSystemWatcherFactory : IFileSystemEntity
- {
- ///
- /// Initializes a new instance of a wrapper for which implements .
- ///
- IFileSystemWatcher New();
-
- ///
- /// Initializes a new instance of a wrapper for which implements .
- ///
- /// The directory to monitor, in standard or Universal Naming Convention (UNC) notation.
- IFileSystemWatcher New(string path);
-
- ///
- /// Initializes a new instance of a wrapper for which implements .
- ///
- /// The directory to monitor, in standard or Universal Naming Convention (UNC) notation.
- ///
- /// The type of files to watch.
- /// For example, "*.txt" watches for changes to all text files.
- ///
- IFileSystemWatcher New(string path, string filter);
-
- ///
- /// Wraps the to the testable interface .
- ///
- [return: NotNullIfNotNull("fileSystemWatcher")]
- IFileSystemWatcher? Wrap(FileSystemWatcher? fileSystemWatcher);
- }
-}
diff --git a/src/TestableIO.System.IO.Abstractions/IFileVersionInfo.cs b/src/TestableIO.System.IO.Abstractions/IFileVersionInfo.cs
deleted file mode 100644
index d7840f2f4..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileVersionInfo.cs
+++ /dev/null
@@ -1,89 +0,0 @@
-using System.Diagnostics;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IFileVersionInfo
- {
- ///
- string? Comments { get; }
-
- ///
- string? CompanyName { get; }
-
- ///
- int FileBuildPart { get; }
-
- ///
- string? FileDescription { get; }
-
- ///
- int FileMajorPart { get; }
-
- ///
- int FileMinorPart { get; }
-
- ///
- string FileName { get; }
-
- ///
- int FilePrivatePart { get; }
-
- ///
- string? FileVersion { get; }
-
- ///
- string? InternalName { get; }
-
- ///
- bool IsDebug { get; }
-
- ///
- bool IsPatched { get; }
-
- ///
- bool IsPrivateBuild { get; }
-
- ///
- bool IsPreRelease { get; }
-
- ///
- bool IsSpecialBuild { get; }
-
- ///
- string? Language { get; }
-
- ///
- string? LegalCopyright { get; }
-
- ///
- string? LegalTrademarks { get; }
-
- ///
- string? OriginalFilename { get; }
-
- ///
- string? PrivateBuild { get; }
-
- ///
- int ProductBuildPart { get; }
-
- ///
- int ProductMajorPart { get; }
-
- ///
- int ProductMinorPart { get; }
-
- ///
- string? ProductName { get; }
-
- ///
- int ProductPrivatePart { get; }
-
- ///
- string? ProductVersion { get; }
-
- ///
- string? SpecialBuild { get; }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IFileVersionInfoFactory.cs b/src/TestableIO.System.IO.Abstractions/IFileVersionInfoFactory.cs
deleted file mode 100644
index a1d9208eb..000000000
--- a/src/TestableIO.System.IO.Abstractions/IFileVersionInfoFactory.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.Diagnostics;
-
-namespace System.IO.Abstractions
-{
- ///
- /// A factory for the creation of wrappers for in a .
- ///
- public interface IFileVersionInfoFactory : IFileSystemEntity
- {
- ///
- IFileVersionInfo GetVersionInfo(string fileName);
- }
-}
diff --git a/src/TestableIO.System.IO.Abstractions/IPath.cs b/src/TestableIO.System.IO.Abstractions/IPath.cs
deleted file mode 100644
index 79334ae21..000000000
--- a/src/TestableIO.System.IO.Abstractions/IPath.cs
+++ /dev/null
@@ -1,205 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.IO.Abstractions
-{
- ///
- public interface IPath : IFileSystemEntity
- {
- ///
- char AltDirectorySeparatorChar { get; }
-
- ///
- char DirectorySeparatorChar { get; }
-
- ///
- char PathSeparator { get; }
-
- ///
- char VolumeSeparatorChar { get; }
-
- ///
- [return: NotNullIfNotNull("path")]
- string? ChangeExtension(string? path, string? extension);
-
- ///
- string Combine(string path1, string path2);
-
- ///
- string Combine(string path1, string path2, string path3);
-
- ///
- string Combine(string path1, string path2, string path3, string path4);
-
- ///
- string Combine(params string[] paths);
-
-#if FEATURE_PATH_SPAN
- ///
- string Combine(params ReadOnlySpan paths);
-#endif
-
-#if FEATURE_ENDS_IN_DIRECTORY_SEPARATOR
- ///
- bool EndsInDirectorySeparator(ReadOnlySpan path);
-
- ///
- bool EndsInDirectorySeparator(string path);
-#endif
-
-#if FEATURE_PATH_EXISTS
- ///
- bool Exists([NotNullWhen(true)] string? path);
-#endif
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- ReadOnlySpan GetDirectoryName(ReadOnlySpan path);
-#endif
-
- ///
- string? GetDirectoryName(string? path);
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- ReadOnlySpan GetExtension(ReadOnlySpan path);
-#endif
-
- ///
- [return: NotNullIfNotNull("path")]
- string? GetExtension(string? path);
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- ReadOnlySpan GetFileName(ReadOnlySpan path);
-#endif
-
- ///
- [return: NotNullIfNotNull("path")]
- string? GetFileName(string? path);
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- ReadOnlySpan GetFileNameWithoutExtension(ReadOnlySpan path);
-#endif
-
- ///
- [return: NotNullIfNotNull("path")]
- string? GetFileNameWithoutExtension(string? path);
-
- ///
- string GetFullPath(string path);
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- string GetFullPath(string path, string basePath);
-#endif
-
- ///
- char[] GetInvalidFileNameChars();
-
- ///
- char[] GetInvalidPathChars();
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- ReadOnlySpan GetPathRoot(ReadOnlySpan path);
-#endif
-
- ///
- string? GetPathRoot(string? path);
-
- ///
- string GetRandomFileName();
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- string GetRelativePath(string relativeTo, string path);
-#endif
-
- ///
- string GetTempFileName();
-
- ///
- string GetTempPath();
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- bool HasExtension(ReadOnlySpan path);
-#endif
-
- ///
- bool HasExtension([NotNullWhen(true)] string? path);
-
-#if FEATURE_ADVANCED_PATH_OPERATIONS
- ///
- bool IsPathFullyQualified(ReadOnlySpan path);
-
- ///
- bool IsPathFullyQualified(string path);
-
- ///
- bool IsPathRooted(ReadOnlySpan path);
-#endif
-
- ///
- bool IsPathRooted([NotNullWhen(true)] string? path);
-
-#if FEATURE_PATH_JOIN_WITH_SPAN
- ///
- string Join(ReadOnlySpan path1, ReadOnlySpan path2);
-
- ///
- string Join(ReadOnlySpan path1,
- ReadOnlySpan path2,
- ReadOnlySpan path3);
-
-#if FEATURE_PATH_SPAN
- ///
- string Join(params ReadOnlySpan paths);
-#endif
-
- ///
- bool TryJoin(ReadOnlySpan path1,
- ReadOnlySpan path2,
- Span destination,
- out int charsWritten);
-
- ///
- bool TryJoin(ReadOnlySpan path1,
- ReadOnlySpan path2,
- ReadOnlySpan path3,
- Span destination,
- out int charsWritten);
-#endif
-
-#if FEATURE_PATH_JOIN_WITH_PARAMS
- ///
- string Join(string? path1, string? path2);
-
- ///
- string Join(string? path1, string? path2, string? path3);
-
- ///
- string Join(params string?[] paths);
-#endif
-
-#if FEATURE_ENDS_IN_DIRECTORY_SEPARATOR
- ///
- ReadOnlySpan TrimEndingDirectorySeparator(ReadOnlySpan path);
-
- ///
- string TrimEndingDirectorySeparator(string path);
-#endif
-
-#if FEATURE_PATH_JOIN_WITH_FOUR_PATHS
- ///
- string Join(ReadOnlySpan path1,
- ReadOnlySpan path2,
- ReadOnlySpan path3,
- ReadOnlySpan path4);
-
- ///
- string Join(string? path1, string? path2, string? path3, string? path4);
-#endif
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/IWaitForChangedResult.cs b/src/TestableIO.System.IO.Abstractions/IWaitForChangedResult.cs
deleted file mode 100644
index e4e2ef022..000000000
--- a/src/TestableIO.System.IO.Abstractions/IWaitForChangedResult.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-namespace System.IO.Abstractions
-{
- ///
- /// Abstractions for .
- ///
- public interface IWaitForChangedResult
- {
- ///
- WatcherChangeTypes ChangeType { get; }
-
- ///
- string? Name { get; }
-
- ///
- string? OldName { get; }
-
- ///
- bool TimedOut { get; }
- }
-}
\ No newline at end of file
diff --git a/src/TestableIO.System.IO.Abstractions/Polyfills/SupportedOSPlatformAttribute.cs b/src/TestableIO.System.IO.Abstractions/Polyfills/SupportedOSPlatformAttribute.cs
deleted file mode 100644
index ef6635b4f..000000000
--- a/src/TestableIO.System.IO.Abstractions/Polyfills/SupportedOSPlatformAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-#if !FEATURE_SUPPORTED_OS_ATTRIBUTE
-namespace System.Runtime.Versioning
-{
- [AttributeUsage(AttributeTargets.All)]
- internal class SupportedOSPlatformAttribute : Attribute
- {
- public SupportedOSPlatformAttribute(string _)
- {
- }
- }
-}
-#endif
diff --git a/src/TestableIO.System.IO.Abstractions/Properties/AssemblyInfo.cs b/src/TestableIO.System.IO.Abstractions/Properties/AssemblyInfo.cs
deleted file mode 100644
index e323c1be1..000000000
--- a/src/TestableIO.System.IO.Abstractions/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using System;
-using System.Runtime.CompilerServices;
-
-[assembly: CLSCompliant(true)]
-
diff --git a/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj b/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj
index bf11eeb41..d5e12936d 100644
--- a/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj
+++ b/src/TestableIO.System.IO.Abstractions/TestableIO.System.IO.Abstractions.csproj
@@ -17,6 +17,7 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+