databricks-cli/cmd/fs/helpers.go

15 lines
269 B
Go

package fs
import (
"fmt"
"strings"
)
func resolveDbfsPath(path string) (string, error) {
if !strings.HasPrefix(path, "dbfs:/") {
return "", fmt.Errorf("expected dbfs path (with the dbfs:/ prefix): %s", path)
}
return strings.TrimPrefix(path, "dbfs:"), nil
}