Skip to content
API referenceDevelopmentEngine APIEngine ccf7d03f
Synced
  • Writes a complete byte payload and atomically installs it at the destination.

API: engine
Project: Inno.Core.IO

public static void Inno.Core.IO.AtomicFile.WriteAllBytes(string path, System.ReadOnlySpan<byte> data, bool overwrite = true)

Parameter path: The destination file path.

Parameter data: The complete file payload.

Parameter overwrite: Whether an existing destination may be replaced; false atomically rejects name collisions.

Exception T:System.IO.IOException: Publication or cleanup fails, the destination already exists in create-only mode, or the filesystem cannot atomically publish a complete file. No copy fallback exposes partial content.

Exception T:System.PlatformNotSupportedException: The host does not provide an atomic create-only filesystem primitive.