os.Mkdir and syscall.Mkdir both have the same Golang API
os.Mkdir
syscall.Mkdir
syscall.Mkdir :
func Mkdir(path string, mode uint32) (err error)
os.Mkdir :
func Mkdir(name string, perm FileMode) error
What is the difference between the two?
The first one is a platform-specific direct system call, possibly faster / you can use all platform-specific bits (e.g. sticky bit on Unix / Linux)
The latter is a portable API that should work the same on every platform; note that the second argument is no longer an anonymous integer, but a limited type.