标签:
获取指定目录下的子文件列表 package main import "fmt" import "io/ioutil" func main() { dir_list, e := ioutil.ReadDir("C:/Documents and Settings/xxx/Desktop/Copy of change-sub") if e != nil { fmt.Println("read dir error") return } for i, v := range dir_list { fmt.Println(i, "=", v.Name()) } }
标签:
原文地址:http://www.cnblogs.com/rojas/p/4395985.html