saveFile method
Saves a file to this storage implementation.
Implementation
@override
Future<bool> saveFile(Release release, ReleaseFile file,
{bool verbose = false}) async {
var dir = releaseDirectory(release);
var localFile = file.toFile(parentDirectory: dir);
localFile.parent.createSync(recursive: true);
if (!overwriteFiles && localFile.existsSync()) {
localFile = File(localFile.path + _newReleaseSuffix);
}
var data = await file.data;
localFile.writeAsBytesSync(data);
localFile.setLastModifiedSync(file.time);
if (file.executable) {
setFileExecutablePermission(localFile, true);
}
if (verbose) {
print(' ยป ${file.toInfo()} > ${localFile.path}');
}
return true;
}