mirror of
https://github.com/octoleo/restic.git
synced 2025-02-08 22:58:24 +00:00
Add comments for List()
This commit is contained in:
parent
b0c6e53241
commit
685ce719ad
@ -34,6 +34,9 @@ type Backend interface {
|
|||||||
|
|
||||||
// List runs fn for each file in the backend which has the type t. When an
|
// List runs fn for each file in the backend which has the type t. When an
|
||||||
// error occurs (or fn returns an error), List stops and returns it.
|
// error occurs (or fn returns an error), List stops and returns it.
|
||||||
|
//
|
||||||
|
// The function fn is called in the same Goroutine that List() is called
|
||||||
|
// from.
|
||||||
List(ctx context.Context, t FileType, fn func(FileInfo) error) error
|
List(ctx context.Context, t FileType, fn func(FileInfo) error) error
|
||||||
|
|
||||||
// IsNotExist returns true if the error was caused by a non-existing file
|
// IsNotExist returns true if the error was caused by a non-existing file
|
||||||
|
@ -26,7 +26,12 @@ type Repository interface {
|
|||||||
|
|
||||||
LookupBlobSize(ID, BlobType) (uint, error)
|
LookupBlobSize(ID, BlobType) (uint, error)
|
||||||
|
|
||||||
List(context.Context, FileType, func(ID, int64) error) error
|
// List calls the function fn for each file of type t in the repository.
|
||||||
|
// When an error is returned by fn, processing stops and List() returns the
|
||||||
|
// error.
|
||||||
|
//
|
||||||
|
// The function fn is called in the same Goroutine List() was called from.
|
||||||
|
List(ctx context.Context, t FileType, fn func(ID, int64) error) error
|
||||||
ListPack(context.Context, ID) ([]Blob, int64, error)
|
ListPack(context.Context, ID) ([]Blob, int64, error)
|
||||||
|
|
||||||
Flush(context.Context) error
|
Flush(context.Context) error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user