Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Atomically installs an existing same-directory candidate file.

API: engine
Project: Inno.Core.IO

public static void Inno.Core.IO.AtomicFile.Install(string source, string destination, bool overwrite = true)

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.

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.

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.