[Haskell-cafe] Path names (again?)

Carl Witty cwitty at newtonlabs.com
Thu Feb 5 16:00:47 EST 2004


On Thu, 2004-02-05 at 13:44, Vincenzo aka Nick Name wrote:
> Yes, I forgot to say "recursively". I have an ocaml implementation but 
> it's prone to errors because of missing "canonicalization", so I did 
> not want to translate that in haskell for the same problem. Currently I 
> workarounded this all by forking "find", but it's prone to errors too 
> because I have no way to distinguish between newlines ending a file 
> name and newlines in the middle of a file name. I should put something 
> like "///" with "find -printf" at the end of each file name, and then 
> parse that, but it would really be preferable to code an haskell 
> library function equivalent to unix find.

If your "find" supports it (GNU find does, I don't know about others),
you can use "find -print0" to NUL-terminate file names.

Carl Witty




More information about the Haskell-Cafe mailing list