1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
samba-mirror/python
Tim Beale 9a3e640bba s3:pylibsmb: Add .deltree() API to SMB py bindings
This basically re-uses the underlying functionality of existing APIs in
order to support a .deltree() API, i.e.
- we use the .list() functionality (i.e. do_listing()) to traverse every
  item in the given directory.
- we then use either .unlink() (i.e. unlink_file()) or .rmdir() (i.e.
  remove_dir()) to delete the individual item.
- sub-directories are handled recursively, by repeating the process.

Note that the .deltree() API is currently only really used for testing
(and deleting GPO files). So the recursion is never going to be
excessive.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-07 01:23:08 +01:00
..
examples PY3: change shebang to python3 in misc dirs 2018-12-14 18:00:40 +01:00
samba s3:pylibsmb: Add .deltree() API to SMB py bindings 2019-01-07 01:23:08 +01:00
samba_external
modules.c python: Port simple libpython module to Python 3 compatible form 2017-06-13 22:46:14 +02:00
modules.h
py3compat.h python: Add compatability helpers to determine if type is really bytes 2018-03-23 07:28:25 +01:00
pyglue.c debug: Use debuglevel_(get|set) function 2018-11-08 11:03:11 +01:00
wscript python/wscript: update to handle waf 2.0.4 2018-09-05 06:37:23 +02:00