// AddContainerIDMapping add a container id mapping to sandbox id
AddContainerIDMapping add a container id mapping to sandbox id
// AddContainerIDMapping add a container id mapping to sandbox id
func AddContainerIDMapping(ctx context.Context, containerID, sandboxID string) error {
	span, _ := Trace(ctx, "addContainerIDMapping")
	defer span.Finish()
	if containerID == "" {
		return fmt.Errorf("Missing container ID")
	}
	if sandboxID == "" {
		return fmt.Errorf("Missing sandbox ID")
	}
	if doUpdatePath() {
		SetCtrsMapTreePath(filepath.Join(rootless.GetRootlessDir(), ctrsMapTreePath))
	}
	parentPath := filepath.Join(ctrsMapTreePath, containerID)
	if err := os.RemoveAll(parentPath); err != nil {
		return err
	}
	path := filepath.Join(parentPath, sandboxID)
	if err := os.MkdirAll(path, ctrsMappingDirMode); err != nil {
		return err
	}
	return nil
}
func AddContainerIDMapping ( ctx context . Context , containerID , sandboxID string ) error { span , _ := Trace ( ctx , " " ) defer span . Finish ( ) if containerID == " " { return fmt . Errorf ( " " ) } if sandboxID == " " { return fmt . Errorf ( " " ) } if doUpdatePath ( ) { SetCtrsMapTreePath ( filepath . Join ( rootless . GetRootlessDir ( ) , ctrsMapTreePath ) ) } parentPath := filepath . Join ( ctrsMapTreePath , containerID ) if err := os . RemoveAll ( parentPath ) ; err != nil { return err } path := filepath . Join ( parentPath , sandboxID ) if err := os . MkdirAll ( path , ctrsMappingDirMode ) ; err != nil { return err } return nil }
AddContainerIDMapping add a container id mapping to sandbox id
AddContainerIDMapping add a container id mapping to sandbox id