Question: Write a method public static clearDirectory(Path dir) that removes all files (but none of the directories) from a directory. Be careful when testing it!
Write a method public static clearDirectory(Path dir) that removes all files (but none of the directories) from a directory. Be careful when testing it!
Step by Step Solution
3.39 Rating (155 Votes )
There are 3 Steps involved in it
Sure we can use the Javas new InputOutput library javanio to do this Here is how you can implement y... View full answer
Get step-by-step solutions from verified subject matter experts
