openframeworks / openframeworks/openFrameworks
ofDirectory::removeDirectory
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
This is just an unfortunate arg ordering.
All other ofFile / ofDirectory methods have bRelativeToData = true as the second arg.
with removeDirectory the second arg is deleteIfEmpty - so it might be easy to be confused with the others and have people accidentally.
ps: not sure what the best fix is here.
anything to do with deleting files should be handled with care.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with ofDirectory::removeDirectory in libs/openFrameworks/utils/ofFileUtils.h around line 272, and compare its argument order with the other ofFile and ofDirectory methods. Determine a safe API change that avoids confusing deleteIfEmpty with bRelativeToData while accounting for the care required by deletion operations. Done means the argument ordering concern has a clearly defined, reviewed resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100