Class ProcessTempRoot
- Namespace
- Archiver.App.Core
- Assembly
- Archiver.App.Core.dll
T-F252: one shared %TEMP% root with a subfolder per Pakko process. Pakko is multi-process by design (T-F88), so a window may delete only its own subfolder; SweepStale() removes the subfolders of processes that are gone (a crash or a kill leaves previewed plaintext behind).
public sealed class ProcessTempRoot
- Inheritance
-
ProcessTempRoot
- Inherited Members
Constructors
ProcessTempRoot(string, string, Func<string, bool>)
Creates a root; isOwnerAlive decides whether a subfolder's owner still runs.
public ProcessTempRoot(string sharedRoot, string ownerName, Func<string, bool> isOwnerAlive)
Parameters
Properties
CurrentOwnerName
This process's subfolder name (ProcessTag, T-F263): the v1.6.0 shape, so a v1.6.0 window still open next to this one sees a live owner.
public static string CurrentOwnerName { get; }
Property Value
OwnRoot
This process's subfolder.
public string OwnRoot { get; }
Property Value
SharedRoot
The folder every process's subfolder lives under.
public string SharedRoot { get; }
Property Value
Methods
CreateScope()
Creates a fresh scope directory under OwnRoot and returns its path.
public string CreateScope()
Returns
DeleteOwn()
Deletes this process's subfolder. Best-effort, never throws.
public void DeleteOwn()
IsOwnerAlive(string)
True when the named process still runs here (IsRunningHere(string)).
public static bool IsOwnerAlive(string ownerName)
Parameters
ownerNamestring
Returns
SweepStale()
Deletes the subfolders of processes that no longer run, and stray files. Best-effort.
public void SweepStale()