Create category policy, governing the creation of files and directories
(ctx context.Context, upstreams []*upstream.Fs, path string)
| 46 | |
| 47 | // Create category policy, governing the creation of files and directories |
| 48 | func (p *EpRand) Create(ctx context.Context, upstreams []*upstream.Fs, path string) ([]*upstream.Fs, error) { |
| 49 | upstreams, err := p.EpAll.Create(ctx, upstreams, path) |
| 50 | if err != nil { |
| 51 | return nil, err |
| 52 | } |
| 53 | return []*upstream.Fs{p.rand(upstreams)}, nil |
| 54 | } |
| 55 | |
| 56 | // CreateEntries is CREATE category policy but receiving a set of candidate entries |
| 57 | func (p *EpRand) CreateEntries(entries ...upstream.Entry) ([]upstream.Entry, error) { |