AtomicFile.Install
Section titled “AtomicFile.Install”
- Atomically installs an existing same-directory candidate file.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Core.IO
Declaration
Section titled “Declaration”public static void Inno.Core.IO.AtomicFile.Install(string source, string destination, bool overwrite = true)Parameters
Section titled “Parameters”Parameter source: The complete candidate file beside the destination.
Parameter destination: The destination file path beside the candidate.
Parameter overwrite: Whether an existing destination may be replaced; false never overwrites an external creator.
Remarks
Section titled “Remarks”A failed create-only publication preserves the candidate. After successful publication the candidate is removed; a subsequent cleanup failure reports that the complete target exists. Unix create-only publication requires same-directory hard-link support. The caller must own the candidate and parent directory until the operation completes.
Exceptions
Section titled “Exceptions”Exception T:System.IO.IOException: Publication fails, create-only mode finds an existing destination, or candidate retirement fails after the complete destination has been published.
Exception T:System.PlatformNotSupportedException: The host does not provide an atomic create-only filesystem primitive.