// SetAPIAddr writes the API Addr to the /api file. func (r *FSRepo) SetAPIAddr(addr ma.Multiaddr) error { f, err := os.Create(filepath.Join(r.path, apiFile)) if err != nil { return err } defer f.Close() _, err = f.WriteString(addr.String()) return err }