Created
August 18, 2015 16:34
-
-
Save 178inaba/7861495054003ef0689d to your computer and use it in GitHub Desktop.
file list from go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
) | |
func main() { | |
files, _ := ioutil.ReadDir("static") | |
for _, f := range files { | |
fmt.Println(f.Name()) | |
fmt.Println("\t", f.Size()) | |
fmt.Println("\t", f.Mode()) | |
fmt.Println("\t", f.ModTime()) | |
fmt.Println("\t", f.IsDir()) | |
fmt.Println("\t", f.Sys()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment