This commit moves a huge chunk of the code to go. The TODO.md document indicates what is left to be done.
13 lines
244 B
Go
13 lines
244 B
Go
package fsx
|
|
|
|
import "os"
|
|
|
|
func IsDirectory(path string) bool {
|
|
info, err := os.Stat(path)
|
|
return err == nil && info.Mode().IsDir()
|
|
}
|
|
|
|
func IsFile(path string) bool {
|
|
info, err := os.Stat(path)
|
|
return err == nil && info.Mode().IsRegular()
|
|
}
|