Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func getFileInfo(path string){
- fileInfo,err := os.Stat(path)
- if err != nil{
- log.Error("find file error:",err.Error())
- }
- fmt.Println("file size:",fileInfo.Size())
- fmt.Println("file name:",fileInfo.Name())
- fmt.Println("file mode:",fileInfo.Mode())
- fmt.Println("file ModTime:",fileInfo.ModTime())
- fmt.Println("file IsDir:",fileInfo.IsDir())
- fmt.Println("file Sys:",fileInfo.Sys())
- }
Add Comment
Please, Sign In to add comment