diff --git a/.idea/.idea.OneDriveArchiver/.idea/workspace.xml b/.idea/.idea.OneDriveArchiver/.idea/workspace.xml
index 9173478..fe76b53 100644
--- a/.idea/.idea.OneDriveArchiver/.idea/workspace.xml
+++ b/.idea/.idea.OneDriveArchiver/.idea/workspace.xml
@@ -23,31 +23,21 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
@@ -135,7 +125,8 @@
-
+
+
1597346544727
@@ -200,7 +191,28 @@
1601561929685
-
+
+ 1601562120750
+
+
+
+ 1601562120750
+
+
+ 1601562133764
+
+
+
+ 1601562133764
+
+
+ 1601562237352
+
+
+
+ 1601562237352
+
+
@@ -230,7 +242,8 @@
-
+
+
@@ -242,124 +255,124 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -374,10 +387,10 @@
-
+
-
+
@@ -389,13 +402,13 @@
file://$PROJECT_DIR$/OneDriveArchiver/Program.cs
- 11
+ 15
-
+
-
+
diff --git a/OneDriveArchiver/IoHelper.cs b/OneDriveArchiver/IoHelper.cs
index 0a9c009..8dd8e43 100644
--- a/OneDriveArchiver/IoHelper.cs
+++ b/OneDriveArchiver/IoHelper.cs
@@ -10,21 +10,28 @@ namespace OneDriveArchiver
public static class IoHelper
{
#region Constructor
-
+ ///
+ /// Construct IoHelper instance
+ ///
static IoHelper()
{
ProcessedFiles = 0;
}
-
-
#endregion
+
#region Properties
+ ///
+ /// Keep track of processed files
+ ///
public static int ProcessedFiles
{
get;
set;
}
#endregion
+
+ #region Private Methods
+
///
/// Archives a one drive file. It takes the file creation date and month,
/// creates the necessary folder structure (if necessary) i.e. Year\Month and
@@ -32,8 +39,9 @@ namespace OneDriveArchiver
/// will sync the changes being made back to the cloud. Base Path is the path where
/// the file was found. So the subfolder will start in the same directory.
///
- ///
- /// Filename
+ /// Name of the application for printing it out
+ /// Path to archive file
+ /// Filename to use
private static void ArchiveOneDriveFile(string appName, string targetPath, string filename)
{
try
@@ -83,7 +91,9 @@ namespace OneDriveArchiver
$"Exception while backing up OneDrive file. Message = {ex.Message}, Stacktrace = {ex.StackTrace}");
}
}
-
+ #endregion
+
+ #region Public Methods
///
/// ProcessFilesForDirectory implementation. Processes all contained directory recursively and
/// archives the files to the archive directory.
@@ -100,7 +110,7 @@ namespace OneDriveArchiver
var containedDirectories = Directory.GetDirectories(currentDirectoryWithFiles);
foreach (var containedDirectory in containedDirectories)
{
- ProcessFilesForDirectory(containedDirectory, appName, targetPath, needsRecursion);
+ ProcessFilesForDirectory(containedDirectory, appName, targetPath, true);
}
}
@@ -142,5 +152,6 @@ namespace OneDriveArchiver
Console.WriteLine($"{appName}: No files found to process.");
}
}
+ #endregion
}
}
\ No newline at end of file
diff --git a/OneDriveArchiver/Program.cs b/OneDriveArchiver/Program.cs
index b34793a..ee19f03 100644
--- a/OneDriveArchiver/Program.cs
+++ b/OneDriveArchiver/Program.cs
@@ -7,6 +7,10 @@ namespace OneDriveArchiver
{
internal static class Program
{
+ ///
+ /// OneDriveArchiver Main entry point
+ ///
+ /// Parameter from the command line
private static void Main(string[] args)
{
const string appName = "OneDriverArchiver";
@@ -28,6 +32,8 @@ namespace OneDriveArchiver
}
// check if the directory to process really exists
+ // default is not using the recursive mode...
+ var needsRecursion = false;
if (!Directory.Exists(args[0]))
{
Console.WriteLine($"{appName}: The source directory '{args[0]}' does not exist. Please specify an existing one.");
@@ -37,9 +43,6 @@ namespace OneDriveArchiver
// normal processing...
Console.WriteLine($"{appName}: starting up...");
- // default is not using the recursive mode...
- var needsRecursion = false;
-
// set target path
var targetPath = args.Length == 1 ? Path.GetFullPath(".") : args[1];
var startUpTime = DateTime.Now;
@@ -60,6 +63,7 @@ namespace OneDriveArchiver
// process the base directory, plus possible containing directories recursively
IoHelper.ProcessFilesForDirectory(args[0], appName, targetPath, needsRecursion);
+ // compute the time we needed in total for processing
var endProcessingTime = DateTime.Now;
var processingTime = endProcessingTime - startUpTime;
diff --git a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll
index 014ee66..e4cd199 100644
Binary files a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll and b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll differ
diff --git a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb
index 1ca6ac1..d86cd6a 100644
Binary files a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb and b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb differ
diff --git a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.exe b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.exe
index 4879e56..363c0ce 100644
Binary files a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.exe and b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.exe differ
diff --git a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.pdb b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.pdb
index 1ca6ac1..d86cd6a 100644
Binary files a/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.pdb and b/OneDriveArchiver/bin/Release/netcoreapp3.1/win-x64/publish/OneDriveArchiver.pdb differ
diff --git a/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache b/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache
index 21eec1d..98540f7 100644
Binary files a/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache and b/OneDriveArchiver/obj/Debug/netcoreapp3.1/OneDriveArchiver.csprojAssemblyReference.cache differ
diff --git a/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.dgspec.json b/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.dgspec.json
index 16d290c..aa6a177 100644
--- a/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.dgspec.json
+++ b/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.dgspec.json
@@ -45,20 +45,6 @@
],
"assetTargetFallback": true,
"warn": true,
- "downloadDependencies": [
- {
- "name": "Microsoft.AspNetCore.App.Runtime.win-x64",
- "version": "[3.1.7, 3.1.7]"
- },
- {
- "name": "Microsoft.NETCore.App.Runtime.win-x64",
- "version": "[3.1.7, 3.1.7]"
- },
- {
- "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64",
- "version": "[3.1.7, 3.1.7]"
- }
- ],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
@@ -66,11 +52,6 @@
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.401\\RuntimeIdentifierGraph.json"
}
- },
- "runtimes": {
- "win-x64": {
- "#import": []
- }
}
}
}
diff --git a/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.g.props b/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.g.props
index 49b31c3..b5fb954 100644
--- a/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.g.props
+++ b/OneDriveArchiver/obj/OneDriveArchiver.csproj.nuget.g.props
@@ -7,11 +7,8 @@
$(UserProfile)\.nuget\packages\
C:\Users\johan\.nuget\packages\
PackageReference
- 5.7.0
+ 5.5.0
-
-
-
$(MSBuildAllProjects);$(MSBuildThisFileFullPath)
diff --git a/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll b/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll
index 014ee66..e4cd199 100644
Binary files a/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll and b/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.dll differ
diff --git a/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb b/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb
index 1ca6ac1..d86cd6a 100644
Binary files a/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb and b/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/OneDriveArchiver.pdb differ
diff --git a/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/linked/OneDriveArchiver.dll b/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/linked/OneDriveArchiver.dll
index 79dd95a..0bc52fb 100644
Binary files a/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/linked/OneDriveArchiver.dll and b/OneDriveArchiver/obj/Release/netcoreapp3.1/win-x64/linked/OneDriveArchiver.dll differ
diff --git a/OneDriveArchiver/obj/project.assets.json b/OneDriveArchiver/obj/project.assets.json
index 738e640..00af3b8 100644
--- a/OneDriveArchiver/obj/project.assets.json
+++ b/OneDriveArchiver/obj/project.assets.json
@@ -1,8 +1,7 @@
{
"version": 3,
"targets": {
- ".NETCoreApp,Version=v3.1": {},
- ".NETCoreApp,Version=v3.1/win-x64": {}
+ ".NETCoreApp,Version=v3.1": {}
},
"libraries": {},
"projectFileDependencyGroups": {
@@ -52,20 +51,6 @@
],
"assetTargetFallback": true,
"warn": true,
- "downloadDependencies": [
- {
- "name": "Microsoft.AspNetCore.App.Runtime.win-x64",
- "version": "[3.1.7, 3.1.7]"
- },
- {
- "name": "Microsoft.NETCore.App.Runtime.win-x64",
- "version": "[3.1.7, 3.1.7]"
- },
- {
- "name": "Microsoft.WindowsDesktop.App.Runtime.win-x64",
- "version": "[3.1.7, 3.1.7]"
- }
- ],
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
@@ -73,11 +58,6 @@
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\3.1.401\\RuntimeIdentifierGraph.json"
}
- },
- "runtimes": {
- "win-x64": {
- "#import": []
- }
}
}
}
\ No newline at end of file
diff --git a/OneDriveArchiver/obj/project.nuget.cache b/OneDriveArchiver/obj/project.nuget.cache
index 526029a..2356580 100644
--- a/OneDriveArchiver/obj/project.nuget.cache
+++ b/OneDriveArchiver/obj/project.nuget.cache
@@ -1,12 +1,8 @@
{
"version": 2,
- "dgSpecHash": "138W0tXEcg4vyZzmm0ngE67FUYyJmz4Gq9oY0SNEdYsE3cYuyqqgro97cunKtYN1Py1b03vmwmOtY6dFsNkKkg==",
+ "dgSpecHash": "Ndf2WK+JZuJJUSvyjFv/NuMjlE5m2nyqs51nC/CyW5fmiE8JzEz8wgkXv1pT4YggV34Kw16kDBMDQzOCSER4GA==",
"success": true,
"projectFilePath": "C:\\Users\\johan\\OneDrive\\DEV\\OneDriveArchiver\\OneDriveArchiver\\OneDriveArchiver.csproj",
- "expectedPackageFiles": [
- "C:\\Users\\johan\\.nuget\\packages\\microsoft.netcore.app.runtime.win-x64\\3.1.7\\microsoft.netcore.app.runtime.win-x64.3.1.7.nupkg.sha512",
- "C:\\Users\\johan\\.nuget\\packages\\microsoft.windowsdesktop.app.runtime.win-x64\\3.1.7\\microsoft.windowsdesktop.app.runtime.win-x64.3.1.7.nupkg.sha512",
- "C:\\Users\\johan\\.nuget\\packages\\microsoft.aspnetcore.app.runtime.win-x64\\3.1.7\\microsoft.aspnetcore.app.runtime.win-x64.3.1.7.nupkg.sha512"
- ],
+ "expectedPackageFiles": [],
"logs": []
}
\ No newline at end of file
diff --git a/OneDriveArchiver/obj/rider.project.restore.info b/OneDriveArchiver/obj/rider.project.restore.info
index 037c5ee..a897af2 100644
--- a/OneDriveArchiver/obj/rider.project.restore.info
+++ b/OneDriveArchiver/obj/rider.project.restore.info
@@ -1 +1 @@
-16013791295246375
\ No newline at end of file
+16020699274521478
\ No newline at end of file