MCPcopy
hub / github.com/lektor/lektor / mkdir

Method mkdir

lektor/publisher.py:283–298  ·  view source on GitHub ↗
(self, path, recursive=True)

Source from the content-addressed store, hash-verified

281 return True
282
283 def mkdir(self, path, recursive=True):
284 if not isinstance(path, str):
285 path = path.decode("utf-8")
286 if path in self._known_folders:
287 return
288 dirname, _ = posixpath.split(path)
289 if dirname and recursive:
290 self.mkdir(dirname)
291 try:
292 self.con.mkd(path)
293 except FTPError as e:
294 msg = str(e)
295 if msg[:4] != "550 ":
296 self.log_buffer.append(str(e))
297 return
298 self._known_folders.add(path)
299
300 def append(self, filename, data):
301 if not isinstance(filename, str):

Callers 15

upload_fileMethod · 0.95
_temporary_folderFunction · 0.80
publishMethod · 0.80
output_pathFunction · 0.80
theme_project_tmpdirFunction · 0.80
theme_builderFunction · 0.80
prepare_stub_dataFunction · 0.80
test_root_paginationFunction · 0.80
test_default_order_byFunction · 0.80

Calls 1

appendMethod · 0.45

Tested by 15

output_pathFunction · 0.64
theme_project_tmpdirFunction · 0.64
theme_builderFunction · 0.64
prepare_stub_dataFunction · 0.64
test_root_paginationFunction · 0.64
test_default_order_byFunction · 0.64
write_filesFunction · 0.64
scratch_project_dataFunction · 0.64
builderFunction · 0.64