code: func (b *Local) StatePaths(name string) (stateIn, stateOut, backupOut string) {
  	statePath := b.OverrideStatePath
  	stateOutPath := b.OverrideStateOutPath
  	backupPath := b.OverrideStateBackupPath
  
  	isDefault := name == backend.DefaultStateName || name == ""
  
  	baseDir := ""
  	if !isDefault {
  		baseDir = filepath.Join(b.stateWorkspaceDir(), name)
  	}
  
  	if statePath == "" {
  		if isDefault {
  			statePath = b.StatePath // s.StatePath applies only to the default workspace, since StateWorkspaceDir is used otherwise
  		}
  		if statePath == "" {
  			statePath = filepath.Join(baseDir, DefaultStateFilename)
  		}
  	}
  	if stateOutPath == "" {
  		stateOutPath = statePath
  	}
  	if backupPath == "" {
  		backupPath = b.StateBackupPath
  	}
  	switch backupPath {
  	case "-":
  		backupPath = ""
  	case "":
  		backupPath = stateOutPath + DefaultBackupExtension
  	}
  
  	return statePath, stateOutPath, backupPath
  }
docs: // StatePaths returns the StatePath, StateOutPath, and StateBackupPath as
  // configured from the CLI.