/*
* 移动文件
* */
removeFile(File sourceFile, String newPath) async {
try {
// prefer using rename as it is probably faster
return await sourceFile.rename(newPath);
} on FileSystemException catch (e) {
// if rename fails, copy the source file and then delete it
final newFile = await sourceFile.copy(newPath);
await sourceFile.delete();
return newFile;
}
}
flutter移动文件
最新推荐文章于 2025-11-30 18:15:47 发布
6076

被折叠的 条评论
为什么被折叠?



