Frage

Just Start boost :: filesystem zu lernen.

  1. Was ist der Unterschied zwischen directory_iterator und basic_path :: iterator?
  2. Haben die Iteratoren Dateien in lexikographischer Reihenfolge durchlaufen?

Danke

War es hilfreich?

Lösung

  1. path::iterator iterates through the directory that form the path. If a path is /a/b/c/d, it will iterate over /, a, b, c and d.

    directory_iterator will instead iterate through files in a directory.

  2. No, directory_iterator will not sort files, they'll be returned in the same order as your operating system calls do.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top