Skip to content

Commit

Permalink
Add mode to SPath.mkdirp
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Aug 6, 2024
1 parent 969527b commit 6bac1fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stgpytools/types/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def get_folder(self) -> SPath:

return SPath(path.dirname(folder_path))

def mkdirp(self) -> None:
def mkdirp(self, mode: int = 0o777) -> None:
"""Make the dir path with its parents."""

return self.get_folder().mkdir(parents=True, exist_ok=True)
return self.get_folder().mkdir(mode, True, True)

def rmdirs(self, missing_ok: bool = False, ignore_errors: bool = True) -> None:
"""Remove the dir path with its contents."""
Expand Down

0 comments on commit 6bac1fe

Please sign in to comment.