From 7418db2679442a910af275b2e899589d96e6a9fd Mon Sep 17 00:00:00 2001 From: Lucas Molas Date: Tue, 2 Aug 2022 13:01:32 -0300 Subject: [PATCH] chore(Directory): add DirIterator API restriction: iterate only once This commit was moved from ipfs/go-ipfs-files@0889edbf54bc298ba39dedc61ee5377bf5bfe39f --- files/file.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/files/file.go b/files/file.go index 4d7ef1132..7ac1fc98a 100644 --- a/files/file.go +++ b/files/file.go @@ -63,7 +63,9 @@ type DirIterator interface { type Directory interface { Node - // Entries returns a stateful iterator over directory entries. + // Entries returns a stateful iterator over directory entries. The iterator + // may consume the Directory state so it must be called only once (this + // applies specifically to the multipartIterator). // // Example usage: //