IsDir check if the path is a directory
(path string)
| 52 | |
| 53 | // IsDir check if the path is a directory |
| 54 | func IsDir(path string) bool { |
| 55 | s, err := os.Stat(path) |
| 56 | if err != nil { |
| 57 | return false |
| 58 | } |
| 59 | return s.IsDir() |
| 60 | } |
| 61 | |
| 62 | // Files returns the collection of all file paths under the specified path |
| 63 | func Files(folder string) ([]string, error) { |