icanhazstring / duck-pony

PHP Integration Server Maintenance
MIT License
5 stars 8 forks source link

Improvement: CleanBranch delete all folders at once #4

Open icanhazstring opened 5 years ago

icanhazstring commented 5 years ago

Currently the CleanBranchCommand iterates over each identified folder and deletes one at a time. This is somewhat time consuming since it produces I/O every time.

This should be changed to delete all folders in a single run which should produce the following unix command:

rm -rf /folder/a /folder/b /folder/

icanhazstring commented 5 years ago

A bit trickier than I thought. Problem is that symfony/filesystem uses rmdir which is only one dir at a time. Maybe I replace this with league/flysystem and introduce a custom Adapter which uses symfony/process to directly call rm -rf on cli.