Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirEntry ¶
func ReadDir ¶
ReadDir does the same as os.ReadDir, but does not sort
Example (Bad) ¶
_, err := ReadDir("dir_that_does_not_exist") fmt.Println("read dir error:", err)
Output: read dir error: open dir_that_does_not_exist: no such file or directory
Example (Good) ¶
entries, err := ReadDir("testdata") fmt.Println("read dir error:", err) fmt.Printf("%+v\n", entries)
Output: read dir error: <nil> [{IsDir:true Name:sub} {IsDir:false Name:1.txt}]
Click to show internal directories.
Click to hide internal directories.