Anonymous user
Walk a directory/Recursively: Difference between revisions
→{{header|C}}
Line 123:
if ( stat(entry->d_name, &fs) < 0 ) return;
if ( S_ISDIR(fs.st_mode) ) {
for(i=0; i < indent; i++)
puts(entry->d_name);
indent += 2;
Line 133:
} else {
if (!regexec(®, entry->d_name, 0, NULL, 0)) {
for(i=0; i < indent; i++) putc(
puts(entry->d_name);
}
|