Rahix / tbot

Automation/Testing tool for Embedded Linux Development
https://tbot.tools
GNU General Public License v3.0
91 stars 21 forks source link

linux.Path: implement rmdir and unlink methods #49

Closed schlimmchen closed 3 years ago

schlimmchen commented 3 years ago

This is a proposal to implement unlink() and rmdir() in tbot.machine.linux.path.Path to conveniently remove empty directories, symlinks and files from a host's filesystem using the shell commands rmdir and rm, respectively.

Tests were added/extended to assert reasonable behavior of the new methods.

The unlink method was equipped with a missing_ok parameter for compatibility to pathlib.Path.unlink().

Signed-off-by: Bernhard Kirchen bernhard.kirchen@mbconnectline.com