I have the following Notebook in Databricks UI:
dbutils.entry_point.getDbutils().notebook().getContext().toJson()
notebook_path = dbutils.notebook.entry_point.getDbutils().notebook().getContext().notebookPath().get()
print(f"Current notebook path: {notebook_path}")
#Now I try to list notebook files
%ls /Users/mar@email.com/path_test
%ls /Users/mar@email.com/
I get this answer:
Current notebook path: /Users/mar@email.com/path_test
ls: cannot access '/Users/mar@email.com/': No such file or directory
ls: cannot access '/Users/mar@email.com/path_test': No such file or directory
-------------
Mondo Technologies GmbH
6300 Zug, Switzerland