ProDOS-Utilities/prodos/writeBlock.go

16 lines
235 B
Go
Raw Normal View History

2021-06-06 03:22:30 +00:00
package prodos
import (
"fmt"
"os"
)
func WriteBlock(file *os.File, block int, buffer []byte) {
fmt.Printf("Write block %d\n", block)
file.WriteAt(buffer, int64(block)*512)
file.Sync()
fmt.Printf("Write block completed\n")
}