aboutsummaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-10-04 10:36:39 -0700
committerRob Mensching <rob@firegiant.com>2022-10-04 14:23:47 -0700
commitbfec456aae2ad7abcec0f8c4c8b2f44308e48961 (patch)
tree6368675e8bf06d8bb04d16ea81bf4125c86c5e3e /src/api
parentd76532b128e4e187fd9ac5e1d018638dcf8876ec (diff)
downloadwix-bfec456aae2ad7abcec0f8c4c8b2f44308e48961.tar.gz
wix-bfec456aae2ad7abcec0f8c4c8b2f44308e48961.tar.bz2
wix-bfec456aae2ad7abcec0f8c4c8b2f44308e48961.zip
Add retries when trying to update bundle resources
Fixes 6882 and 6902
Diffstat (limited to 'src/api')
-rw-r--r--src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs b/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
index d633c823..26184462 100644
--- a/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
+++ b/src/api/wix/WixToolset.Extensibility/Services/IFileSystem.cs
@@ -2,6 +2,8 @@
2 2
3namespace WixToolset.Extensibility.Services 3namespace WixToolset.Extensibility.Services
4{ 4{
5 using System;
6
5 /// <summary> 7 /// <summary>
6 /// Abstracts basic file system operations. 8 /// Abstracts basic file system operations.
7 /// </summary> 9 /// </summary>
@@ -16,10 +18,27 @@ namespace WixToolset.Extensibility.Services
16 void CopyFile(string source, string destination, bool allowHardlink); 18 void CopyFile(string source, string destination, bool allowHardlink);
17 19
18 /// <summary> 20 /// <summary>
21 /// Deletes a file.
22 /// </summary>
23 /// <param name="source">The file to delete.</param>
24 /// <param name="throwOnError">Indicates the file must be deleted. Default is a best effort delete.</param>
25 /// <param name="maxRetries">Maximum retry attempts. Default is 4.</param>
26 void DeleteFile(string source, bool throwOnError = false, int maxRetries = 4);
27
28 /// <summary>
19 /// Moves a file. 29 /// Moves a file.
20 /// </summary> 30 /// </summary>
21 /// <param name="source">The file to move.</param> 31 /// <param name="source">The file to move.</param>
22 /// <param name="destination">The destination file.</param> 32 /// <param name="destination">The destination file.</param>
23 void MoveFile(string source, string destination); 33 void MoveFile(string source, string destination);
34
35 /// <summary>
36 /// 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
38 /// that might get interrupted by external systems (usually anti-virus).
39 /// </summary>
40 /// <param name="action">Action to execute.</param>
41 /// <param name="maxRetries">Maximum retry attempts. Default is 4.</param>
42 void ExecuteWithRetries(Action action, int maxRetries = 4);
24 } 43 }
25} 44}