golang filepath.Glob

package main

import (
    "fmt"
    "path/filepath"
)

func main() {
    //找出/home/ 目录下的所有的log文件
    matches, _ = filepath.Glob("C:/Documents and Settings/xxx/Desktop/Copy of change-sub/*.md")
    for k, v := range matches {
        fmt.Println(k, v)
    }
}

 

posted on 2015-04-07 13:55  rojas  阅读(4197)  评论(0编辑  收藏  举报