Help us shape the future of Go! Take the 2026 Go Developer Survey

dirsync

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2026 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package dirsync opens a directory so that fsyncing it makes the creates, renames and removes inside it durable — the step the WAL, checkpoints and every design-time store take after changing a directory's entries.

On Unix that is just os.Open. Windows is why this package exists: os.Open gives a directory a read-only handle, and FlushFileBuffers requires a handle with write access, so the fsync is refused with "Access is denied". Opening the directory is the one step that differs, so it is the one step that lives here; each caller keeps its own Sync and its own error wording.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(dir string) (*os.File, error)

Open opens dir read-only, which is all fsync on a directory needs outside Windows.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL