Java copy a folder excluding some internal file

前端 未结 4 694
故里飘歌
故里飘歌 2021-01-19 01:54

I have a folder with this structure

mainFolder

   --Sub1  
         --File .scl
         --File .awl
         --Other files
   --Sub2  
         --Fi         


        
4条回答
  •  萌比男神i
    2021-01-19 02:14

    Looks pretty clean to me. Just don't put all that directly in the calling code so you don't have to look at it all the time. Make your own CopySubDir class that hides all this code and provides a simple to understand interface to it. Then the calling code will look clean.

提交回复
热议问题