[READ-ONLY] Mirror of https://github.com/shuuji3/system-programming-by-golang. Repository for "Goならわかるシステムプログラム" ascii.jp/elem/000/001/235/1235262/
0

Configure Feed

Select the types of activity you want to include in your feed.

feat: createDir() and removeDir()

+14
+1
src/10-filesystem/hello-go-file.txt
··· 1 1 Hello Go File! 2 + Appended Hello Go!!
+13
src/10-filesystem/main.go
··· 38 38 io.WriteString(file, "Appended Hello Go!!\n") 39 39 } 40 40 41 + // Create directory 42 + func createDir() { 43 + os.Mkdir("test", 0644) 44 + os.MkdirAll("test2/nest/dir/all", 0644) 45 + } 46 + 47 + func removeDir() { 48 + os.Remove("test") 49 + os.Remove("test2/nest/dir/all") 50 + } 51 + 41 52 func main() { 42 53 open() 43 54 read() 44 55 appendHello() 45 56 read() 57 + createDir() 58 + removeDir() 46 59 }