func (a NotebooksAPI) Mkdirs(path string) error {
	mtx.Lock()
	defer mtx.Unlock()
	return a.client.Post(a.context, "/workspace/mkdirs", map[string]string{
		"path": path,
	}, nil)
}
Mkdirs will make folders in a workspace recursively given a path
package workspace
import (
	"context"
	"encoding/base64"
	"path/filepath"
	"strings"
	"sync"
	"github.com/databrickslabs/terraform-provider-databricks/common"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
	"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
)
type Language string
type ObjectType string
type ExportFormat string
const (
	Source  ExportFormat = "SOURCE"
	HTML    ExportFormat = "HTML"
	Jupyter ExportFormat = "JUPYTER"
	DBC     ExportFormat = "DBC"
	Scala  Language = "SCALA"
	Python Language = "PYTHON"
	SQL    Language = "SQL"
	R      Language = "R"
	Notebook      ObjectType = "NOTEBOOK"
	Directory     ObjectType = "DIRECTORY"
	LibraryObject ObjectType = "LIBRARY"
)
var extMap = map[string]string{
	".scala": "SCALA",
	".py":    "PYTHON",
	".sql":   "SQL",
	".r":     "R",
}
type ObjectStatus struct {
	ObjectID   int64      `json:"object_id,omitempty" tf:"computed"`
	ObjectType ObjectType `json:"object_type,omitempty" tf:"computed"`
	Path       string     `json:"path"`
	Language   Language   `json:"language,omitempty"`
}
type NotebookContent struct {
	Content string `json:"content,omitempty"`
}
type ImportRequest struct {
	Content   string `json:"content"`
	Path      string `json:"path"`
	Language  string `json:"language,omitempty"`
	Format    string `json:"format,omitempty"`
	Overwrite bool   `json:"overwrite,omitempty"`
}
type NotebookDeleteRequest struct {
	Path      string `json:"path,omitempty"`
	Recursive bool   `json:"recursive,omitempty"`
}
func NewNotebooksAPI(ctx context.Context, m interface{}) NotebooksAPI {
	return NotebooksAPI{m.(*common.DatabricksClient), ctx}
}
type NotebooksAPI struct {
	client  *common.DatabricksClient
	context context.Context
}
var mtx = &sync.Mutex{}
func (a NotebooksAPI) Create(r ImportRequest) error {
	mtx.Lock()
	defer mtx.Unlock()
	return a.client.Post(a.context, "/workspace/import", r, nil)
}
func (a NotebooksAPI) Read(path string) (ObjectStatus, error) {
	var notebookInfo ObjectStatus
	err := a.client.Get(a.context, "/workspace/get-status", map[string]string{
		"path": path,
	}, &notebookInfo)
	return notebookInfo, err
}
type workspacePathRequest struct {
	Format ExportFormat `url:"format,omitempty"`
	Path   string       `url:"path,omitempty"`
}
func (a NotebooksAPI) Export(path string, format ExportFormat) (string, error) {
	var notebookContent NotebookContent
	err := a.client.Get(a.context, "/workspace/export", workspacePathRequest{
		Format: format,
		Path:   path,
	}, &notebookContent)
	return notebookContent.Content, err
}