func OpenFile(name string, flag int, perm FileMode) (*File, error)f, err := os.OpenFile("notes.txt", os.O_RDWR|os.O_CREATE|O_TRUNC, 0755)“O_TRUNC”在寫入之前是否清空整個文件?“截斷”是什么意思?另外,該函數ioutil.WriteFile()在寫入之前是否清空整個文件?
os.O_TRUNC 的作用是什么?
慕桂英4014372
2023-07-31 17:02:25