file.py 463 B

12345678910111213141516171819202122
  1. from setux.core.action import Action
  2. class Directory(Action):
  3. @property
  4. def label(self):
  5. return f'dir {self.path}'
  6. def check(self):
  7. directory = self.target.dir.fetch(
  8. self.path,
  9. **self.spec,
  10. )
  11. return directory.check() is True
  12. def deploy(self):
  13. directory = self.target.dir.fetch(
  14. self.path,
  15. **self.spec,
  16. )
  17. return directory.deploy() is True