Copy files from a folder of SD card into another folder of SD card

前端 未结 5 849
日久生厌
日久生厌 2020-12-13 10:22

Is it possible to copy a folder present in sdcard to another folder present the same sdcard programmatically ??

If so, how to do that?

5条回答
  •  被撕碎了的回忆
    2020-12-13 10:47

    To move files or directories, you can use File.renameTo(String path) function

    File oldFile = new File (oldFilePath);
    oldFile.renameTo(newFilePath);
    

提交回复
热议问题