chapel-lang/chapel — pull request #992 by bradcray (2014-12-10 01:30:00+00:00)
Title: Change Filerator to use isLink(), isDir(), isFile()

Previously, I had been using my own home-cooked runtime query to
determine whether something was a directory and/or a symbolic
link. Now that Lydia (and Francisco?) have provided utility
functions for this, I can use theirs and get rid of some (now-dead)
code.

The only thing that's slightly ugly about my approach is how I
'use'd the FileSystem module. I wanted to use it at the
procedure scope, but it seemed to somehow pollute my
'path' variable -- perhaps there's another identifier with this
name at module scope? So instead, I 'use'd it in a dummy
scope to get it into the module namespace and then named
it explicitly when calling is*(). Though a little ugly, I think the
filerator routines should eventually be folded into FileSystem
anyway (once the names and semantics are finalized?), at
which point the use can go away anyway.

Most of the diff here is (happily) dead code elimination.