// MakeSuccessorCopy implements the ImmutableRootMetadata interface for RootMetadataV3.
186825
func (md *RootMetadataV3) MakeSuccessorCopy(
	codec kbfscodec.Codec, extra ExtraMetadata, _ MetadataVer,
	_ func() ([]kbfscrypto.TLFCryptKey, error), isReadableAndWriter bool) (
	MutableRootMetadata, ExtraMetadata, error) {
	var extraCopy ExtraMetadata
	if extra != nil {
		var err error
		extraCopy, err = extra.MakeSuccessorCopy(codec)
		if err != nil {
			return nil, nil, err
		}
	}
	mdCopy, err := md.DeepCopy(codec)
	if err != nil {
		return nil, nil, err
	}
	// TODO: If there is ever a RootMetadataV4 this will need to perform the conversion.
	return mdCopy, extraCopy, nil
}
704754
func (c *ConfigLocal) MakeDiskMDCacheIfNotExists() error {
	c.lock.Lock()
	defer c.lock.Unlock()
	if c.diskMDCache != nil {
		return nil
	}
	return c.resetDiskMDCacheLocked()
}
447276
func (c *ConfigLocal) MakeBlockMetadataStoreIfNotExists() (err error) {
	c.lock.Lock()
	defer c.lock.Unlock()
	defer func() {
		c.xattrStore = NewXattrStoreFromBlockMetadataStore(c.blockMetadataStore)
	}()
	if c.blockMetadataStore != nil {
		return nil
	}
	c.blockMetadataStore, err = newDiskBlockMetadataStore(c)
	if err != nil {
		// TODO (KBFS-3659): when we can open levelDB read-only,
		//  do that instead of returning a Noop version.
		c.blockMetadataStore = &NoopBlockMetadataStore{}
		return err
	}
	return nil
}
595700
func (in *SourceStrategyDefaultsConfig) DeepCopy() *SourceStrategyDefaultsConfig {
	if in == nil {
		return nil
	}
	out := new(SourceStrategyDefaultsConfig)
	in.DeepCopyInto(out)
	return out
}
431158
func (_m *API) VirtualizationCopyTo(ctx context.Context, ID string, path string, content io.Reader, AllowOverwriteDirWithFile bool, CopyUIDGID bool) error {
	ret := _m.Called(ctx, ID, path, content, AllowOverwriteDirWithFile, CopyUIDGID)

	var r0 error
	if rf, ok := ret.Get(0).(func(context.Context, string, string, io.Reader, bool, bool) error); ok {
		r0 = rf(ctx, ID, path, content, AllowOverwriteDirWithFile, CopyUIDGID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
588822
func (vars variables) makeCopy() variables {
	varscopy := make(variables, len(vars))
	for n, v := range vars {
		vcopy := *v
		varscopy[n] = &vcopy
	}
	return varscopy
}
619519
func makeCopyContentTypeC(sourceAlias string, sourceURL clientURL, sourceContent *clientContent, targetAlias string, targetURL string, encKeyDB map[string][]prefixSSEPair) URLs {
	newSourceURL := sourceContent.URL
	pathSeparatorIndex := strings.LastIndex(sourceURL.Path, string(sourceURL.Separator))
	newSourceSuffix := filepath.ToSlash(newSourceURL.Path)
	if pathSeparatorIndex > 1 {
		sourcePrefix := filepath.ToSlash(sourceURL.Path[:pathSeparatorIndex])
		newSourceSuffix = strings.TrimPrefix(newSourceSuffix, sourcePrefix)
	}
	newTargetURL := urlJoinPath(targetURL, newSourceSuffix)
	return makeCopyContentTypeA(sourceAlias, sourceContent, targetAlias, newTargetURL, encKeyDB)
}
993118
func (in *InstanceGroupSpec) DeepCopy() *InstanceGroupSpec {
	if in == nil {
		return nil
	}
	out := new(InstanceGroupSpec)
	in.DeepCopyInto(out)
	return out
}
121464
func (md *RootMetadataV2) DeepCopy(
	codec kbfscodec.Codec) (MutableRootMetadata, error) {
	return md.deepCopy(codec)
}
871886
func ByteSliceCopy(in *[]byte, out *[]byte, s Scope) error {
	*out = make([]byte, len(*in))
	copy(*out, *in)
	return nil
}
500739
func SassMakeDataCompiler(godc SassDataContext) SassCompiler {
	dc := C.sass_make_data_compiler(godc)
	return (SassCompiler)(dc)
}
440517
func (w *wrapper) RawCopy() Configuration {
	w.mut.Lock()
	defer w.mut.Unlock()
	return w.cfg.Copy()
}
1071485
func (in *RBACAuthorizationSpec) DeepCopy() *RBACAuthorizationSpec {
	if in == nil {
		return nil
	}
	out := new(RBACAuthorizationSpec)
	in.DeepCopyInto(out)
	return out
}
284020
func (in *BuildConfigSpec) DeepCopy() *BuildConfigSpec {
	if in == nil {
		return nil
	}
	out := new(BuildConfigSpec)
	in.DeepCopyInto(out)
	return out
}
560598
func (in *BuildSpec) DeepCopy() *BuildSpec {
	if in == nil {
		return nil
	}
	out := new(BuildSpec)
	in.DeepCopyInto(out)
	return out
}
1250265
func (md *RootMetadata) MakeSuccessorWithNewHandle(
	ctx context.Context, newHandle *tlfhandle.Handle, latestMDVer kbfsmd.MetadataVer,
	codec kbfscodec.Codec, keyManager KeyManager,
	merkleGetter idutil.MerkleRootGetter, teamKeyer teamKeysGetter,
	osg idutil.OfflineStatusGetter, mdID kbfsmd.ID, isWriter bool) (
	*RootMetadata, error) {
	mdCopy, err := md.deepCopy(codec)
	if err != nil {
		return nil, err
	}

	mdCopy.extra = nil
	mdCopy.tlfHandle = newHandle.DeepCopy()
	mdCopy.SetWriters(newHandle.ResolvedWriters())
	// Readers are not tracked explicitly in the MD, but their key
	// bundles are cleared out with the `ClearForV4Migration()` call
	// below.
	mdCopy.SetUnresolvedWriters(newHandle.UnresolvedWriters())
	mdCopy.SetUnresolvedReaders(newHandle.UnresolvedReaders())
	mdCopy.bareMd.ClearForV4Migration()

	return mdCopy.MakeSuccessor(
		ctx, latestMDVer, codec, keyManager, merkleGetter, teamKeyer, osg,
		mdID, isWriter)
}
810750
func (md *RootMetadataV3) DeepCopy(
	codec kbfscodec.Codec) (MutableRootMetadata, error) {
	var newMd RootMetadataV3
	if err := kbfscodec.Update(codec, &newMd, md); err != nil {
		return nil, err
	}
	return &newMd, nil
}