1
1
2
+
2
3
# fs
3
- import "github.com/kr/fs"
4
+ ` import "github.com/kr/fs" `
5
+
6
+ * [ Overview] ( #pkg-overview )
7
+ * [ Index] ( #pkg-index )
8
+ * [ Examples] ( #pkg-examples )
4
9
10
+ ## <a name =" pkg-overview " >Overview</a >
5
11
Package fs provides filesystem-related functions.
6
12
7
13
8
14
9
15
16
+ ## <a name =" pkg-index " >Index</a >
17
+ * [ type FileSystem] ( #FileSystem )
18
+ * [ type Walker] ( #Walker )
19
+ * [ func Walk(root string) * Walker] ( #Walk )
20
+ * [ func WalkFS(root string, fs FileSystem) * Walker] ( #WalkFS )
21
+ * [ func (w * Walker) Err() error] ( #Walker.Err )
22
+ * [ func (w * Walker) Path() string] ( #Walker.Path )
23
+ * [ func (w * Walker) SkipDir()] ( #Walker.SkipDir )
24
+ * [ func (w * Walker) Stat() os.FileInfo] ( #Walker.Stat )
25
+ * [ func (w * Walker) Step() bool] ( #Walker.Step )
26
+
27
+ #### <a name =" pkg-examples " >Examples</a >
28
+ * [ Walker] ( #example_Walker )
29
+
30
+ #### <a name =" pkg-files " >Package files</a >
31
+ [ filesystem.go] ( /src/github.com/kr/fs/filesystem.go ) [ walk.go] ( /src/github.com/kr/fs/walk.go )
10
32
11
33
12
34
13
- ## type FileSystem
35
+
36
+
37
+
38
+ ## <a name =" FileSystem " >type</a > [ FileSystem] ( /src/target/filesystem.go?s=121:774#L1 )
14
39
``` go
15
40
type FileSystem interface {
16
41
@@ -42,8 +67,7 @@ FileSystem defines the methods of an abstract filesystem.
42
67
43
68
44
69
45
-
46
- ## type Walker
70
+ ## <a name =" Walker " >type</a > [ Walker] ( /src/target/walk.go?s=494:580#L5 )
47
71
``` go
48
72
type Walker struct {
49
73
// contains filtered or unexported fields
@@ -63,16 +87,14 @@ Walker does not follow symbolic links.
63
87
64
88
65
89
66
-
67
-
68
- ### func Walk
90
+ ### <a name =" Walk " >func</a > [ Walk] ( /src/target/walk.go?s=692:722#L19 )
69
91
``` go
70
92
func Walk (root string ) *Walker
71
93
```
72
94
Walk returns a new Walker rooted at root.
73
95
74
96
75
- ### func WalkFS
97
+ ### <a name="WalkFS"> func</a> [ WalkFS](/src/target/walk.go?s=826:873#L24)
76
98
``` go
77
99
func WalkFS(root string, fs FileSystem) *Walker
78
100
```
@@ -81,7 +103,8 @@ WalkFS returns a new Walker rooted at root on the FileSystem fs.
81
103
82
104
83
105
84
- ### func (\*Walker) Err
106
+
107
+ ### <a name="Walker.Err">func</a> (\*Walker) [Err](/src/target/walk.go?s=2325:2353#L77)
85
108
``` go
86
109
func (w *Walker) Err() error
87
110
```
@@ -91,7 +114,8 @@ an error, w will not descend into that directory.
91
114
92
115
93
116
94
- ### func (\*Walker) Path
117
+
118
+ ### <a name="Walker.Path">func</a> (\*Walker) [Path](/src/target/walk.go?s=1946:1976#L64)
95
119
``` go
96
120
func (w *Walker) Path() string
97
121
```
@@ -102,7 +126,8 @@ a directory containing the file "a", Path will return "dir/a".
102
126
103
127
104
128
105
- ### func (\*Walker) SkipDir
129
+
130
+ ### <a name="Walker.SkipDir">func</a> (\*Walker) [SkipDir](/src/target/walk.go?s=2496:2522#L83)
106
131
``` go
107
132
func (w *Walker) SkipDir()
108
133
```
@@ -111,7 +136,8 @@ If w is not on a directory, SkipDir has no effect.
111
136
112
137
113
138
114
- ### func (\*Walker) Stat
139
+
140
+ ### <a name="Walker.Stat">func</a> (\*Walker) [Stat](/src/target/walk.go?s=2090:2125#L70)
115
141
``` go
116
142
func (w *Walker) Stat() os.FileInfo
117
143
```
@@ -120,7 +146,8 @@ visited by a call to Step.
120
146
121
147
122
148
123
- ### func (\*Walker) Step
149
+
150
+ ### <a name="Walker.Step">func</a> (\*Walker) [Step](/src/target/walk.go?s=1176:1204#L36)
124
151
``` go
125
152
func (w *Walker) Step() bool
126
153
```
@@ -136,6 +163,5 @@ It returns false when the walk stops at the end of the tree.
136
163
137
164
138
165
139
-
140
166
- - -
141
167
Generated by [godoc2md](http:// godoc.org/github.com/davecheney/godoc2md)
0 commit comments