diff options
author | Rob Mensching <rob@firegiant.com> | 2022-07-26 17:20:48 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-08-05 09:22:36 -0700 |
commit | 024e03c1ae9d956834b9ccc4d4f91a991507b27c (patch) | |
tree | c3a6e2ebe56962aab2ac2d05ad5816a0eb0f3943 /src/api | |
parent | c832d739c92205b95c95c5deba5cbd5765bb6eca (diff) | |
download | wix-024e03c1ae9d956834b9ccc4d4f91a991507b27c.tar.gz wix-024e03c1ae9d956834b9ccc4d4f91a991507b27c.tar.bz2 wix-024e03c1ae9d956834b9ccc4d4f91a991507b27c.zip |
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.
Diffstat (limited to 'src/api')
-rw-r--r-- | src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs | 25 |
1 files changed, 25 insertions, 0 deletions
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 @@ | |||
1 | // 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. | ||
2 | |||
3 | namespace WixToolset.Extensibility.Services | ||
4 | { | ||
5 | /// <summary> | ||
6 | /// Abstracts basic file system operations. | ||
7 | /// </summary> | ||
8 | public interface IFileSystem | ||
9 | { | ||
10 | /// <summary> | ||
11 | /// Copies a file. | ||
12 | /// </summary> | ||
13 | /// <param name="source">The file to copy.</param> | ||
14 | /// <param name="destination">The destination file.</param> | ||
15 | /// <param name="allowHardlink">Allow hardlinks.</param> | ||
16 | void CopyFile(string source, string destination, bool allowHardlink); | ||
17 | |||
18 | /// <summary> | ||
19 | /// Moves a file. | ||
20 | /// </summary> | ||
21 | /// <param name="source">The file to move.</param> | ||
22 | /// <param name="destination">The destination file.</param> | ||
23 | void MoveFile(string source, string destination); | ||
24 | } | ||
25 | } | ||