Last active
April 22, 2019 07:02
-
-
Save tejasvi/a9fc9bc7393180dd66bf45945badb04c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
switch (d.get_type()) { | |
case DirectoryIterator::DIRECTORY: { | |
const char * pt = strrchr(d.leafname(), '.'); | |
if (pt) | |
if (binary_search(dasfile.begin(), dasfile.end(), pt)) { | |
index_file(file, url, d, mime_map); | |
break; | |
} | |
size_t new_limit = depth_limit; | |
if (new_limit) { | |
if (--new_limit == 0) continue; | |
} | |
url += '/'; | |
file += '/'; | |
index_directory(file, url, new_limit, mime_map); | |
break; | |
} | |
case DirectoryIterator::REGULAR_FILE: | |
index_file(file, url, d, mime_map); | |
break; | |
default: | |
skip("U" + url, file.substr(root.size()), "Not a regular file", | |
d.get_size(), d.get_mtime(), | |
SKIP_VERBOSE_ONLY | SKIP_SHOW_FILENAME); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment