From 024e03c1ae9d956834b9ccc4d4f91a991507b27c Mon Sep 17 00:00:00 2001
From: Rob Mensching <rob@firegiant.com>
Date: Tue, 26 Jul 2022 17:20:48 -0700
Subject: Abstract file system to remove Core to Core.Native dependency

The only dependency Core had on Core.Native was for FileSystem which
would be better served as an extensibility service everywhere anyway.
This moves FileSystem to Core and exposes it via IFileSystem from
Extensibility for use everywhere. Core now carries no native code
dependencies.
---
 .../Services/IFileSystem.cs                        | 25 ++++++++++++++++++++++
 1 file changed, 25 insertions(+)
 create mode 100644 src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs

(limited to 'src/api')

diff --git a/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs b/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
new file mode 100644
index 00000000..d633c823
--- /dev/null
+++ b/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
@@ -0,0 +1,25 @@
+// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
+
+namespace WixToolset.Extensibility.Services
+{
+    /// <summary>
+    /// Abstracts basic file system operations.
+    /// </summary>
+    public interface IFileSystem
+    {
+        /// <summary>
+        /// Copies a file.
+        /// </summary>
+        /// <param name="source">The file to copy.</param>
+        /// <param name="destination">The destination file.</param>
+        /// <param name="allowHardlink">Allow hardlinks.</param>
+        void CopyFile(string source, string destination, bool allowHardlink);
+
+        /// <summary>
+        /// Moves a file.
+        /// </summary>
+        /// <param name="source">The file to move.</param>
+        /// <param name="destination">The destination file.</param>
+        void MoveFile(string source, string destination);
+    }
+}
-- 
cgit v1.2.3-55-g6feb