alpha
Login
or
Join now
shuuji3.xyz
/
system-programming-by-golang
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/shuuji3/system-programming-by-golang. Repository for "Goならわかるシステムプログラム"
ascii.jp/elem/000/001/235/1235262/
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
feat: createDir() and removeDir()
author
TAKAHASHI Shuuji
date
7 years ago
(Jun 15, 2019, 4:11 AM +0900)
commit
41292290
412922907f3f6fc35c22bc39543e386aad4c3d7c
parent
bdebee45
bdebee459d1e83592d97e5f14216d8e5cf676153
+14
2 changed files
Expand all
Collapse all
Unified
Split
src
10-filesystem
hello-go-file.txt
main.go
+1
src/10-filesystem/hello-go-file.txt
View file
Reviewed
···
1
1
Hello Go File!
2
2
+
Appended Hello Go!!
+13
src/10-filesystem/main.go
View file
Reviewed
···
38
38
io.WriteString(file, "Appended Hello Go!!\n")
39
39
}
40
40
41
41
+
// Create directory
42
42
+
func createDir() {
43
43
+
os.Mkdir("test", 0644)
44
44
+
os.MkdirAll("test2/nest/dir/all", 0644)
45
45
+
}
46
46
+
47
47
+
func removeDir() {
48
48
+
os.Remove("test")
49
49
+
os.Remove("test2/nest/dir/all")
50
50
+
}
51
51
+
41
52
func main() {
42
53
open()
43
54
read()
44
55
appendHello()
45
56
read()
57
57
+
createDir()
58
58
+
removeDir()
46
59
}