github.com/ncruces/go-sqlite3@v0.15.1-0.20240520133447-53eef1510ff0/vfs/os_std_mode.go (about)

     1  //go:build !unix || sqlite3_nosys
     2  
     3  package vfs
     4  
     5  import "os"
     6  
     7  func osSetMode(file *os.File, modeof string) error {
     8  	fi, err := os.Stat(modeof)
     9  	if err != nil {
    10  		return err
    11  	}
    12  	file.Chmod(fi.Mode())
    13  	return nil
    14  }