返回 DeepSeek-Reasonix
open_read_other.go
根目录 / internal / fileops / open_read_other.go
1 //go:build !windows
2
3 package fileops
4
5 import "os"
6
7 // OpenReplaceableRead opens a regular source for reading while allowing a
8 // writer to atomically replace its pathname. Unix files can be unlinked or
9 // renamed while open, so the ordinary descriptor has the required semantics.
10 func OpenReplaceableRead(path string) (*os.File, error) {
11 return os.Open(path)
12 }
13
13 lines GO