Guest User

Untitled

a guest
Apr 16th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. func getFileInfo(path string){
  2. fileInfo,err := os.Stat(path)
  3. if err != nil{
  4. log.Error("find file error:",err.Error())
  5. }
  6. fmt.Println("file size:",fileInfo.Size())
  7. fmt.Println("file name:",fileInfo.Name())
  8. fmt.Println("file mode:",fileInfo.Mode())
  9. fmt.Println("file ModTime:",fileInfo.ModTime())
  10. fmt.Println("file IsDir:",fileInfo.IsDir())
  11. fmt.Println("file Sys:",fileInfo.Sys())
  12. }
Add Comment
Please, Sign In to add comment