Skip to content

Conversation

@piotrrojek
Copy link

Simple implementation of SkipDir function.

Addresses #1

@piotrrojek
Copy link
Author

I just realized the issue was related to original Walk from standard library. Oh well...
But maybe it could be useful.

With that we should avoid edge cases failures.
@matryer
Copy link
Member

matryer commented Feb 26, 2016

Ah nice. The spec for filepath.Walk asks that the WalkFunc returns an error (filepath.SkipDir) in order to skip the directory. Since walking occurs concurrently, this cannot be done, so I like this approach. Perhaps a SkipDir(path string, info os.FileInfo) bool func would be nice to let the calling code decide this at runtime, rather than having to know up-front?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants