我很好奇如何将权限从一个目录复制到另一个目录。 有什么想法吗?
谢谢
最佳答案
shutil.copymode
应该帮助你。来自文档:
shutil.copymode(src, dst)
Copy the permission bits from src to dst. The file contents, owner, and group are unaffected. src and dst are path names given as strings.
我在 Ubuntu Jaunty 中使用 Python 2.6.2 对此进行了测试,它对我有用。
关于python - 如何复制目录权限,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3754848/