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

Side by Side Diff: common/dirwalk/observer.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: Small updates. Created 4 years, 3 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The LUCI Authors. All rights reserved.
2 // Use of this source code is governed under the Apache License, Version 2.0
3 // that can be found in the LICENSE file.
4
5 package dirwalk
6
7 /**
M-A Ruel 2016/09/15 14:31:02 Always use // comments for consistency. I do it th
mithro 2016/09/20 12:41:43 Done.
8 Interface for receiving the results of walking a directory tree.
9
10 For performance reasons, small files and large files are treated differently.
11
12 SmallFile and LargeFile must be called in sorted order.
13 */
14 type WalkObserver interface {
15 SmallFile(filename string, alldata []byte)
16 LargeFile(filename string)
M-A Ruel 2016/09/15 14:31:02 why not just have OnFile(path string, content []by
mithro 2016/09/20 12:41:43 I originally had a single call back which provided
M-A Ruel 2016/09/20 16:37:26 I disagree. The walk is finished when the function
mithro 2016/09/22 11:19:58 You seemed to miss the part where I mentioned the
17
18 //StartDir(dirname string) error
19 //FinishDir(dirname string)
20
21 Error(pathname string, err error)
22
23 Finished()
M-A Ruel 2016/09/15 14:31:02 It's finished when the function returns. Overall
mithro 2016/09/20 12:41:44 See my comments below.
24 }
OLDNEW
« no previous file with comments | « common/dirwalk/doc.go ('k') | common/dirwalk/test.sh » ('j') | common/dirwalk/test.sh » ('J')

Powered by Google App Engine
This is Rietveld 408576698