摘要:
1、以块的形式读取文件 package main import ( "io" "os" "fmt" ) const BufferSize = 100 func main() { file, err := os.Open("filetoread.txt") if err != nil { fmt.Pr 阅读全文
摘要:
package main import ( "bufio" //缓存IO "fmt" "io" "io/ioutil" //io 工具包 "os" ) func check(e error) { if e != nil { panic(e) } } /** * 判断文件是否存在 存在返回 true 阅读全文