getDownloadPathV2 static method
Implementation
static Future<String> getDownloadPathV2(String uuid, String name) async {
bool ismac = Platform.isMacOS;
var spt = ismac ? "/" : "\\";
var paths = Platform.resolvedExecutable.split(spt);
var avpaths = paths.sublist(0, paths.length - 1);
var imPath = normalize(avpaths.join(spt));
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String pkgName = packageInfo.packageName;
var donwloadpath = join(imPath, pkgName, 'download', uuid, name);
if (!ismac) {
final String documentsDirectoryPath = "${Platform.environment['USERPROFILE']}";
donwloadpath = join(documentsDirectoryPath, "Documents", ".TencentCloudChat", pkgName, "download", uuid, name);
}
return donwloadpath;
}