2

I'd like to use the find function from the turtle package such that it matches any file path (in order to get an equivalent behavior to find . in bash). However I cannot find a wildcard pattern that I can use with this function.

find :: Pattern a -> FilePath -> Shell FilePath

I guess I could construct a pattern that matches any character zero or more times, but I'd like to avoid re-inventing the wheel.

Chris Stryczynski
  • 30,145
  • 48
  • 175
  • 286
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34

1 Answers1

2

lsif sounds more like what you want. The documentation contains an example how to print the complete tree:

lstree = lsif (\_ -> return True)

So in your case, you would use

lstree "."

Note that the output between find and lstree "." differs slightly: the original path isn't duplicated in the latter.

Zeta
  • 103,620
  • 13
  • 194
  • 236