 }
 
 func spelunkDir(path: String) {
-  let dp = opendir(path)
-  if dp == nil {
+  guard let dp = opendir(path) else {
     // Ignore in case permission denies access to the directory.
     return
   }



var sw = Stopwatch()
var a = [UInt8]("/".utf8)
a.append(0)
sw.start()
trackDir(a)
p("trackDir   count: \(count) Elapsed: \(sw.millis)")

count = 0
sw.start()
spelunkDir("/")
p("spelunkDir count: \(count) Elapsed: \(sw.millis)")

count = 0
sw.start()
do {
  try browseDir(a)
} catch {
  // ignore errors.
}
p("browseDir  count: \(count) Elapsed: \(sw.millis)")

count = 0
sw.start()
do {
  try browseDir2(a)
} catch {
  // ignore errors.
}
p("browseDir2 count: \(count) Elapsed: \(sw.millis)")

count = 0
sw.start()
peekDir(a)
p("peekDir    count: \(count) Elapsed: \(sw.millis)")

count = 0
sw.start()
trackDir(a)
p("**trackDir count: \(count) Elapsed: \(sw.millis)")

            continue PATH
          }
        }
        entry = readdir(dp!)
      }
      closedir(dp!)
      if store.count > 0 {
        (pb, dp) = store.removeLast()
        continue DIRP
