Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Unified Diff: common/dirwalk/callback.go

Issue 2054763004: luci-go/common/dirwalk: Code for walking a directory tree efficiently Base URL: https://github.com/luci/luci-go@master
Patch Set: Major rewrite of the code. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | common/dirwalk/doc.go » ('j') | common/dirwalk/tests/tools/gendir/content.go » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: common/dirwalk/callback.go
diff --git a/common/dirwalk/callback.go b/common/dirwalk/callback.go
new file mode 100644
index 0000000000000000000000000000000000000000..32a0b865d5bfb61e46b8dc9fbfbc1b3aa3adabb2
--- /dev/null
+++ b/common/dirwalk/callback.go
@@ -0,0 +1,16 @@
+// Copyright 2016 The LUCI Authors. All rights reserved.
+// Use of this source code is governed under the Apache License, Version 2.0
+// that can be found in the LICENSE file.
+
+package dirwalk
+
+import "io"
+
+// WalkFunc is a callback for receiving the results of walking a directory
+// tree.
+//
+// r.Close() should be called if r is not nil.
+//
+// Callback for a directory will have a nil reader and occur *after* all the
+// paths contained inside the directory have already been provided.
+type WalkFunc func(path string, size int64, r io.ReadCloser, err error)
« no previous file with comments | « no previous file | common/dirwalk/doc.go » ('j') | common/dirwalk/tests/tools/gendir/content.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698