y/y.go
func CreateSyncedFile(filename string, sync bool) (*os.File, error) {
	flags := os.O_RDWR | os.O_CREATE | os.O_EXCL
	if sync {
		flags |= datasyncFileFlag
	}
	return os.OpenFile(filename, flags, 0666)
}
func CreateSyncedFile(filename string, sync bool) (*os.File, error) {
	flags := os.O_RDWR | os.O_CREATE | os.O_EXCL
	if sync {
		flags |= datasyncFileFlag
	}
	return os.OpenFile(filename, flags, 0666)
}
func CreateSyncedFile ( filename string , sync bool ) ( * os . File , error ) { flags := os . O_RDWR | os . O_CREATE | os . O_EXCL if sync { flags |= datasyncFileFlag } return os . OpenFile ( filename , flags , 0666 ) }
// CreateSyncedFile creates a new file (using O_EXCL), errors if it already existed.
CreateSyncedFile creates a new file ( using O_EXCL ) errors if it already existed .