Files
2021-12-29 22:47:53 +01:00

19 lines
345 B
Go

package root
import (
"context"
"fmt"
)
// Link creates a symlink.
func (r *Store) Link(ctx context.Context, from, to string) error {
subFrom, fName := r.getStore(from)
subTo, tName := r.getStore(to)
if !subFrom.Equals(subTo) {
return fmt.Errorf("sylinks across stores are not supported")
}
return subFrom.Link(ctx, fName, tName)
}