lib.FileContext.mkdir(): Add method
Add .mkdir() to the API which should do the expected, and implement it in ExecContext and Local specializations.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
7547d13a6d
commit
432830a5c5
3 changed files with 13 additions and 0 deletions
|
|
@ -504,6 +504,10 @@ class ExecContext(Base):
|
|||
cmd = ['mv', src, dst]
|
||||
await self.run(cmd, cmd_input=InputMode.NonInteractive)
|
||||
|
||||
async def _mkdir(self, name: str, mode: int) -> None:
|
||||
cmd = ['mkdir', name, '-m', self.__mode_str(mode)]
|
||||
await self.run(cmd, cmd_input=InputMode.NonInteractive)
|
||||
|
||||
async def _mktemp(self, tmpl: str, directory: bool) -> str:
|
||||
cmd = ['mktemp']
|
||||
if directory:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue