def CreateFile(
self, directory_path: str, file_name: str, filename_suffix: str):
"""Creates a empty file.
Args:
directory_path (str): The path to the directory the file should be
created.
file_name (str): the name of the new file.
filename_suffix (str): the suffix of the new file.
Returns:
str: the path of the created file
"""
file_path = self.CreateFilePath(directory_path, file_name,
filename_suffix)
if not os.path.exists(directory_path):
self._CreateFolder(directory_path)
pathlib.Path(file_path).touch()
return file_path
评论列表
文章目录