getPath method
获取存储路径
Implementation
Future<String> getPath(String dbName) async {
// 加后缀名
String _dbName = dbName;
if (!dbName.endsWith(".db")) {
_dbName = _dbName + ".db";
}
// 生成自定义路径,用于增量更新用
Directory documentsDirectory = await getApplicationDocumentsDirectory();
String path = join(documentsDirectory.path, "DBTools", _dbName);
return path;
}