[BUG] project.add_file(path, force=False)我想添加到具体目录,tree参数添加没有反应,force=false设置完没效果,依旧在项目里添加多个文件
gffguo opened this issue · 1 comments
gffguo commented
Describe the bug
A clear and concise description of what the bug is.
System information
- pbxproj version used: 3.2
- python version used: 3.8
- Xcode version used:11.3
To Reproduce
Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here. e.g. Provide a sample snippet and a sample project
gffguo commented
我自己的问题,我使用有误,给指定文件夹下添加,需要这样,比如项目下有A,A里有B文件夹,放入B文件夹应该,group = project.get_or_create_group('A'), group2 = project.get_or_create_group('A',group), project.addfile('文件路径', parent = group2, force = False ), 不过如果我addfile('路径') 不改变parent参数,force=False好像失效了,我还不太清楚