Walk a directory/Recursively: Difference between revisions
Content added Content deleted
m (→{{header|C++}}) |
|||
Line 6: | Line 6: | ||
'''Note:''' Please be careful when running any code examples found here. |
'''Note:''' Please be careful when running any code examples found here. |
||
=={{header|8th}}== |
|||
<lang forth> |
|||
"*.c" f:rglob \ top of stack now has list of all "*.c" files, recursively |
|||
</lang> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |
||
<lang ada>with Ada.Directories; use Ada.Directories; |
<lang ada>with Ada.Directories; use Ada.Directories; |
||
Line 32: | Line 36: | ||
end Test_Directory_Walk;</lang> |
end Test_Directory_Walk;</lang> |
||
The solution first enumerates files in a directory, that includes the subdirectories, if their names match the pattern. Then it steps down into each of the subdirectories. The pseudo directories . and .. are excluded. The behavior upon symbolic links depends on the [[OS]] and the implementation of the Ada.Directories package. |
The solution first enumerates files in a directory, that includes the subdirectories, if their names match the pattern. Then it steps down into each of the subdirectories. The pseudo directories . and .. are excluded. The behavior upon symbolic links depends on the [[OS]] and the implementation of the Ada.Directories package. |
||
=={{header|ALGOL 68}}== |
=={{header|ALGOL 68}}== |
||
<!-- {{does not work with|ALGOL 68|Standard - extensions to language used}} --> |
<!-- {{does not work with|ALGOL 68|Standard - extensions to language used}} --> |