mirror of https://github.com/databricks/cli.git
Update error message to be clearer when using filer.ReadDir for UC Volumes
This commit is contained in:
parent
5fda017057
commit
551c0277ce
|
@ -63,8 +63,8 @@ type FilesClient struct {
|
|||
root WorkspaceRootPath
|
||||
}
|
||||
|
||||
func filesNotImplementedError(fn string) error {
|
||||
return fmt.Errorf("filer.%s is not implemented for the Files API", fn)
|
||||
func listAPINotAvailableError(fn string) error {
|
||||
return fmt.Errorf("list API is not yet available for UC Volumes")
|
||||
}
|
||||
|
||||
func NewFilesClient(w *databricks.WorkspaceClient, root string) (Filer, error) {
|
||||
|
@ -192,7 +192,7 @@ func (w *FilesClient) Delete(ctx context.Context, name string, mode ...DeleteMod
|
|||
}
|
||||
|
||||
func (w *FilesClient) ReadDir(ctx context.Context, name string) ([]fs.DirEntry, error) {
|
||||
return nil, filesNotImplementedError("ReadDir")
|
||||
return nil, listAPINotAvailableError("ReadDir")
|
||||
}
|
||||
|
||||
func (w *FilesClient) Mkdir(ctx context.Context, name string) error {
|
||||
|
|
Loading…
Reference in New Issue