belongs to collection: Golang syscall Package Programs
In the Go programming language, to make directories using syscall – we use the Mkdir() function of the syscall package. The Mkdir() function is used to make directories.
Syntax:
func Mkdir(path string, mode uint32) (err error)
Consider the below example demonstrating how to make directories using syscall in Golang?
package main import ( "fmt" "syscall" ) func main() { // Creating directories err := syscall.Mkdir("/tmp/dir1", 0754) // Printing message if there is no error if err == nil { fmt.Println("success") } }
Output
success
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Syntax:
Consider the below example demonstrating how to make directories using syscall in Golang?
Output
need an explanation for this answer? contact us directly to get an explanation for this answer