📜  如何在颤振中重命名文件 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:07.608000             🧑  作者: Mango

代码示例1
import 'package:path_provider/path_provider.dart';

...
...

PickedFile pickedFile = await _picker.getImage(source: ImageSource.camera);

// Save and Rename file to App directory
String dir = (await getApplicationDocumentsDirectory()).path;
String newPath = path.join(dir, 'case01wd03id01.jpg');
File f = await File(pickedF.path).copy(newPath);