Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
Expand docstring for Directory.Entries
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Dec 9, 2018
1 parent b925960 commit 26bbce7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 12 additions & 0 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ type Directory interface {
// Note:
// - Some implementations of this functions may define some constraints in how
// it can be used
// - Each implementation MUST support:
// - Pre-order sequential iteration:
// - Meaning that after calling `Next` you can call `Next` if the returned
// node is a directory or read the returned file
// - Skipping entries:
// - Meaning that if `Next` returns a directory, you can skip reading it's
// entries and skip to next entry. Files don't have to be read in full.
// Note that you can't go back to unread entries, this only allows
// skipping parts of a directory tree
// - This is to allow listing files in a directory without having to read
// the entire tree
// - Entries may not be sorted
Entries() DirIterator
}

Expand Down
4 changes: 0 additions & 4 deletions multipartfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ var ErrPartOutsideParent = errors.New("file outside parent dir")
var ErrPartInChildTree = errors.New("file in child tree")

// MultipartFile implements Node, and is created from a `multipart.Part`.
//
// Note: iterating entries can be done only once and must be done in order,
// meaning that when iterator returns a directory, you MUST read all it's
// children before calling Next again
type MultipartFile struct {
Node

Expand Down

0 comments on commit 26bbce7

Please sign in to comment.