Most efficient way to move a directory in haskell

What is the most efficient way to move a directory and all of its contents?

Is there a more efficient way than just looping through each file in the directory and calling System.Directory.renameFile

on it?

+3


source to share


1 answer


Just use System.Directory.renameDirectory



ฮป System.Directory.getDirectoryContents "temp2"
[".","..","x","y"]
ฮป System.Directory.renameDirectory "temp2" "temp"
ฮป System.Directory.getDirectoryContents "temp"
[".","..","x","y"]

      

+7


source







All Articles