Talk:Walk a directory/Recursively: Difference between revisions

Content added Content deleted
Line 25: Line 25:


::: In every OS that I am aware of, a symlink needs special treatment to be read (if they are supported at all), and a hardlink to a directory is an error. --[[User:Rdm|Rdm]] 12:10, 13 June 2011 (UTC)
::: In every OS that I am aware of, a symlink needs special treatment to be read (if they are supported at all), and a hardlink to a directory is an error. --[[User:Rdm|Rdm]] 12:10, 13 June 2011 (UTC)

:::: It's a matter of whether the language you use by default returns true for a directory test on a symlinked dir. For example, in bash:
::::<lang bash>if [ -d /some/symlink/to/dir ]
then echo it is a dir
fi</lang>
::::will say it is a directory, and you can do globbing on it just like normal dirs. You'd have to specifically remember to check if it's a symlink. --[[User:Ledrug|Ledrug]] 20:53, 13 June 2011 (UTC)