diff options
author | Tyler Gill <tyler.gill@byu.net> | 2017-09-22 09:30:10 +0300 |
---|---|---|
committer | Tyler Gill <tyler.gill@byu.net> | 2017-09-22 09:30:10 +0300 |
commit | 7c3ce32ee2b625933dcc6b8e1cab631ea502b141 (patch) | |
tree | f8d82bd52cd497bc90b17ab1c212fc319f2f62b4 /Duplicati/CommandLine/Commands.cs | |
parent | 401f1f3104306f4cea9ecd298fa6818a70b67a77 (diff) |
Add support for the quota reporting and renaming interfaces to the OneDrive backend.
To test the quota support, quota information is reported on the command line if it is available.
However, the rename support hasn't been tested, since I don't see anything using that functionality yet.
Diffstat (limited to 'Duplicati/CommandLine/Commands.cs')
-rw-r--r-- | Duplicati/CommandLine/Commands.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/Duplicati/CommandLine/Commands.cs b/Duplicati/CommandLine/Commands.cs index 0ae5f7fcc..9e429b1c5 100644 --- a/Duplicati/CommandLine/Commands.cs +++ b/Duplicati/CommandLine/Commands.cs @@ -582,16 +582,29 @@ namespace Duplicati.CommandLine {
var parsedStats = result.BackendStatistics as Duplicati.Library.Interface.IParsedBackendStatistics;
output.MessageEvent(string.Format(" Duration of backup: {0:hh\\:mm\\:ss}", result.Duration));
- if (parsedStats != null && parsedStats.KnownFileCount > 0)
+ if (parsedStats != null)
{
- output.MessageEvent(string.Format(" Remote files: {0}", parsedStats.KnownFileCount));
- output.MessageEvent(string.Format(" Remote size: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.KnownFileSize)));
+ if (parsedStats.KnownFileCount > 0)
+ {
+ output.MessageEvent(string.Format(" Remote files: {0}", parsedStats.KnownFileCount));
+ output.MessageEvent(string.Format(" Remote size: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.KnownFileSize)));
+ }
+
+ if (parsedStats.TotalQuotaSpace >= 0)
+ {
+ output.MessageEvent(string.Format(" Total quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.TotalQuotaSpace)));
+ }
+
+ if (parsedStats.FreeQuotaSpace >= 0)
+ {
+ output.MessageEvent(string.Format(" Available quota: {0}", Library.Utility.Utility.FormatSizeString(parsedStats.FreeQuotaSpace)));
+ }
}
output.MessageEvent(string.Format(" Files added: {0}", result.AddedFiles));
output.MessageEvent(string.Format(" Files deleted: {0}", result.DeletedFiles));
output.MessageEvent(string.Format(" Files changed: {0}", result.ModifiedFiles));
-
+
output.MessageEvent(string.Format(" Data uploaded: {0}", Library.Utility.Utility.FormatSizeString(result.BackendStatistics.BytesUploaded)));
output.MessageEvent(string.Format(" Data downloaded: {0}", Library.Utility.Utility.FormatSizeString(result.BackendStatistics.BytesDownloaded)));
}
|