github.com/ncruces/go-sqlite3@v0.15.1-0.20240520133447-53eef1510ff0/util/osutil/open.go (about)

     1  //go:build !windows
     2  
     3  package osutil
     4  
     5  import (
     6  	"io/fs"
     7  	"os"
     8  )
     9  
    10  // OpenFile behaves the same as [os.OpenFile],
    11  // except on Windows it sets [syscall.FILE_SHARE_DELETE].
    12  //
    13  // See: https://go.dev/issue/32088#issuecomment-502850674
    14  func OpenFile(name string, flag int, perm fs.FileMode) (*os.File, error) {
    15  	return os.OpenFile(name, flag, perm)
    16  }