G
G
Grigory Vasilkov2016-11-24 11:01:02
PHP
Grigory Vasilkov, 2016-11-24 11:01:02

Glob template for selecting all files, incl. hidden in all subdirectories, incl. hidden how will it look like?

Good afternoon, I work with Bitrix, and they really like to make folders that start with a dot.
To recursively, from a script, delete files on the server (SSH is not allowed due to company policy) - you need a Glob template, PHP certainly has a DirectoryIterator, but the glob template would be useful for other purposes - such as working with GULP, when creating modules .
Here's what I tried
"./{,.}**/{,.}*"
and noticed with regret that ordinary files are issued recursively, but hidden ones are issued exactly up to the first level, that is, each nesting level must be specified manually, and if they are like in Bitrix - at least 20 levels, and it is not known how many of them there will be - how to do?
What would such a template look like?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question