Skip to content

Commit

Permalink
Adding docstring to create_path
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbourret committed May 31, 2024
1 parent 1128562 commit d26005c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python-lib/sharepoint_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@ def create_folder(self, full_path):
return response

def create_path(self, file_full_path):
"""
Ensure the path of folders that will contain the file specified in file_full_path exists.
I.e. create all missing folders along the path.
Does not create the last element in the end of the path as that is the file we will add later
(unless it ends in / in which case a folder will be created for that also).
"""
full_path, filename = os.path.split(file_full_path)
tokens = full_path.split("/")
path = ""
Expand Down

0 comments on commit d26005c

Please sign in to comment.