Recursive - delete folders

  • To delete a folder with its contents 
  • windows delete folders are deleted from the inside out
  • Principle: You must delete from the inside out, first innermost folder files deleted, then delete this folder

 

Recursive, recursive first into the lowest level folder, this folder files deleted (35, 36 lines), because after this folder has no content of the (line 31 for the end), the implementation of line 39, this document delete folder, then the equivalent of the top layer of his relative folder executing the 34 rows once, then perform 31 lines for statement is executed traversal this folder.

Guess you like

Origin www.cnblogs.com/beeenwei/p/12553659.html