@@ -27,6 +27,8 @@ public GVFSPlatform(UnderConstructionFlags underConstruction)
2727 public UnderConstructionFlags UnderConstruction { get ; }
2828 public abstract string Name { get ; }
2929
30+ public abstract string GVFSConfigPath { get ; }
31+
3032 public static void Register ( GVFSPlatform platform )
3133 {
3234 if ( GVFSPlatform . Instance != null )
@@ -70,6 +72,27 @@ public static void Register(GVFSPlatform platform)
7072 public abstract bool IsElevated ( ) ;
7173 public abstract string GetCurrentUser ( ) ;
7274 public abstract string GetUserIdFromLoginSessionId ( int sessionId , ITracer tracer ) ;
75+
76+ /// <summary>
77+ /// Get the directory for upgrades that is permissioned to
78+ /// require elevated privileges to modify. This can be used for
79+ /// data that we don't want normal user accounts to modify.
80+ /// </summary>
81+ public abstract string GetUpgradeProtectedDataDirectory ( ) ;
82+
83+ /// <summary>
84+ /// Directory that upgrader log directory should be placed
85+ /// in. There can be multiple log directories, so this is the
86+ /// containing directory to place them in.
87+ /// </summary>
88+ public abstract string GetUpgradeLogDirectoryParentDirectory ( ) ;
89+
90+ /// <summary>
91+ /// Directory that contains the file indicating that a new
92+ /// version is available.
93+ /// </summary>
94+ public abstract string GetUpgradeHighestAvailableVersionDirectory ( ) ;
95+
7396 public abstract void ConfigureVisualStudio ( string gitBinPath , ITracer tracer ) ;
7497
7598 public abstract bool TryGetGVFSHooksPathAndVersion ( out string hooksPaths , out string hooksVersion , out string error ) ;
@@ -93,6 +116,10 @@ public abstract FileBasedLock CreateFileBasedLock(
93116 ITracer tracer ,
94117 string lockPath ) ;
95118
119+ public abstract ProductUpgraderPlatformStrategy CreateProductUpgraderPlatformInteractions (
120+ PhysicalFileSystem fileSystem ,
121+ ITracer tracer ) ;
122+
96123 public bool TryGetNormalizedPathRoot ( string path , out string pathRoot , out string errorMessage )
97124 {
98125 pathRoot = null ;
@@ -111,8 +138,15 @@ public bool TryGetNormalizedPathRoot(string path, out string pathRoot, out strin
111138 public abstract class GVFSPlatformConstants
112139 {
113140 public static readonly char PathSeparator = Path . DirectorySeparatorChar ;
141+ public abstract int MaxPipePathLength { get ; }
114142 public abstract string ExecutableExtension { get ; }
115143 public abstract string InstallerExtension { get ; }
144+
145+ /// <summary>
146+ /// Indicates whether the platform supports running the upgrade application while
147+ /// the upgrade verb is running.
148+ /// </summary>
149+ public abstract bool SupportsUpgradeWhileRunning { get ; }
116150 public abstract string WorkingDirectoryBackingRootPath { get ; }
117151 public abstract string DotGVFSRoot { get ; }
118152
@@ -122,6 +156,20 @@ public abstract class GVFSPlatformConstants
122156
123157 public abstract string GVFSExecutableName { get ; }
124158
159+ public abstract string ProgramLocaterCommand { get ; }
160+
161+ /// <summary>
162+ /// Different platforms can have different requirements
163+ /// around which processes can block upgrade. For example,
164+ /// on Windows, we will block upgrade if any GVFS commands
165+ /// are running, but on POSIX platforms, we relax this
166+ /// constraint to allow upgrade to run while the upgrade
167+ /// command is running. Another example is that
168+ /// Non-windows platforms do not block upgrade when bash
169+ /// is running.
170+ /// </summary>
171+ public abstract HashSet < string > UpgradeBlockingProcesses { get ; }
172+
125173 public string GVFSHooksExecutableName
126174 {
127175 get { return "GVFS.Hooks" + this . ExecutableExtension ; }
0 commit comments