I don't know how to detect whether two filepaths are in the same
filesystem.
Yes you do!
If I use System.Directory.renameFile and the final location is in
another filesystem, I'll get an error "renameFile:renamePath:rename:
unsupported operation (Invalid cross-device link)".
And it follows that if you get no error, the two filepaths are in the
same filesystem
What's the best way to move the file if possible but copy-and-delete
if necessary?
Catch that error, and copy-and-delete.
Donn
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafeOnly members subscribed via the mailman list are allowed to post.