package main import ( "fmt" "os" "path/filepath" ) func walkFunc(path string, info os.FileInfo, err error) error { fmt.Printf("%s\n", path) return nil } func main() { //遍历打印所有的文件名 filepath.Walk("C:/Documents and Settings/xxx/Desktop/Copy of change-sub", walkFunc) }
时间: 2024-10-27 11:31:34