Last active
August 29, 2015 14:27
-
-
Save razerdp/1eb5ab1d9355d815c652 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
新增方法 | |
DevToolsFactory.getFileTools().copyfile(String fromPath, String toPath, Boolean rewrite) | |
在您需要用的地方请调用它,然后传入源文件的路径和目标文件的路径,并设置是否可以覆盖目标文件 | |
请务必保证路径的绝对性以及加上文件的后缀 | |
例如fromPath="sdcard/xxx/xxx.txt" | |
同样,目标文件例子:toPath="sdcard/xxx/xxx.txt" | |
当rewrite为true时,若目标文件存在,则会覆盖目标文件。 | |
当rewrite为false时,若目标文件存在,则会在原目标文件的末尾加上-new。 | |
使用前请务必加上必要的权限。 | |
以上...... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment