aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-10-04 10:44:09 -0700
committerRob Mensching <rob@firegiant.com>2022-10-04 14:23:47 -0700
commit9a18c230cfd88996b43c8ff7c59a195fb34ed3cf (patch)
tree262f52dbcfee8bf513450d597a589fa2686f1882 /src/api
parentbfec456aae2ad7abcec0f8c4c8b2f44308e48961 (diff)
downloadwix-9a18c230cfd88996b43c8ff7c59a195fb34ed3cf.tar.gz
wix-9a18c230cfd88996b43c8ff7c59a195fb34ed3cf.tar.bz2
wix-9a18c230cfd88996b43c8ff7c59a195fb34ed3cf.zip
Use file system abstraction to handle retries automatically
Fixes 4791
Diffstat (limited to 'src/api')
-rw-r--r--src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs b/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
index 26184462..cd987555 100644
--- a/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
+++ b/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
@@ -3,6 +3,7 @@
3namespace WixToolset.Extensibility.Services 3namespace WixToolset.Extensibility.Services
4{ 4{
5 using System; 5 using System;
6 using System.IO;
6 7
7 /// <summary> 8 /// <summary>
8 /// Abstracts basic file system operations. 9 /// Abstracts basic file system operations.
@@ -33,6 +34,15 @@ namespace WixToolset.Extensibility.Services
33 void MoveFile(string source, string destination); 34 void MoveFile(string source, string destination);
34 35
35 /// <summary> 36 /// <summary>
37 /// Opens a file.
38 /// </summary>
39 /// <param name="path">The file to open.</param>
40 /// <param name="mode">A System.IO.FileMode value that specifies whether a file is created if one does not exist, and determines whether the contents of existing files are retained or overwritten.</param>
41 /// <param name="access">A System.IO.FileAccess value that specifies the operations that can be performed on the file.</param>
42 /// <param name="share">A System.IO.FileShare value specifying the type of access other threads have to the file.</param>
43 FileStream OpenFile(string path, FileMode mode, FileAccess access, FileShare share);
44
45 /// <summary>
36 /// Executes an action and retries on any exception a few times with short pause 46 /// Executes an action and retries on any exception a few times with short pause
37 /// between each attempt. Primarily intended for use with file system operations 47 /// between each attempt. Primarily intended for use with file system operations
38 /// that might get interrupted by external systems (usually anti-virus). 48 /// that might get interrupted by external systems (usually anti-virus).