{
  "slug": "file-flag-write-through",
  "term": "FILE_FLAG_WRITE_THROUGH",
  "aliases": [
    "Windows write-through file flag"
  ],
  "definition": "FILE_FLAG_WRITE_THROUGH is a Windows file-open flag that requests immediate propagation of writes instead of delayed cache writeback.",
  "note": "Write-through alone can still use the Windows system cache. FILE_FLAG_NO_BUFFERING independently bypasses that cache for file-data I/O; it does not affect disk hardware caching or memory-mapped files. Combining both flags bypasses the system cache and requests hardware-cache write-through, subject to device support. [windows-create-file]\n\nOn NTFS, write-through also flushes metadata changes resulting from that request. NO_BUFFERING alone can leave metadata cached; use FlushFileBuffers when that metadata must be flushed. Unbuffered file I/O also requires appropriate transfer-size, offset and buffer-address alignment. Neither flag supplies multi-operation atomicity. [windows-create-file] [windows-file-caching] [windows-file-buffering]",
  "related": [
    "flush-file-buffers",
    "flush-view-of-file",
    "write-through-cache",
    "direct-io",
    "cache-flush",
    "file-flag-no-buffering"
  ],
  "citations": [
    {
      "id": "windows-create-file",
      "title": "Microsoft: CreateFileA, Caching Behavior and independent file flags",
      "url": "https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea#caching-behavior",
      "accessed": "2026-11-14"
    },
    {
      "id": "windows-file-caching",
      "title": "Microsoft: File Caching, write-through and metadata",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/file-caching",
      "accessed": "2026-11-14"
    },
    {
      "id": "windows-file-buffering",
      "title": "Microsoft: File Buffering, alignment and hardware-cache scope",
      "url": "https://learn.microsoft.com/en-us/windows/win32/fileio/file-buffering",
      "accessed": "2026-11-14"
    },
    {
      "id": "hesela-windows-flush",
      "title": "Hesela: Windows mapped-file synchronization and cache boundaries",
      "url": "https://hesela.com/analyses/mmap-visibility-size-durability/#windows-flush",
      "accessed": "2026-11-14"
    }
  ],
  "provenance": [
    "Microsoft Win32 documentation reviewed 14 November 2026; no Windows runtime, power-loss or remote-server experiment was performed.",
    "Related POSIX and Linux APIs are comparisons, not claims of equivalent completion or error semantics."
  ],
  "status": "shipping",
  "advantages": [],
  "limitations": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-11-14"
}
