A
A
Anton Shtinov2014-12-03 17:50:58
PHP
Anton Shtinov, 2014-12-03 17:50:58

How to traverse a directory in multiple passes?

Push in which direction to look. It is necessary to index a bunch of files in the file system. I tried to recursively go through the directory to search for all the files, but it turns out to be very long and it may happen that there is not enough time for the script to work. How can this task be broken down into smaller tasks? I see an option to get a certain number of files at a time, but the question is how to save the current state so that you can continue searching from it later.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
FanatPHP, 2014-12-03
@delimer

Console scripts have no execution time limit.
Problem solved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question