summaryrefslogtreecommitdiff
path: root/DiscoBot
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-07-09 15:52:59 +0200
committerTrueDoctor <d-kobert@web.de>2018-07-09 15:52:59 +0200
commitf8123cd7a2df78fa1e08d2cbf08ce9ffda3d9583 (patch)
tree36dab5d641501d0cb2ec4daa8c1dc42a395f6c9e /DiscoBot
parent2503ca78d3e583cb1291cb9a99a6e79526a348ee (diff)
SaveCommand now shows datetime
Diffstat (limited to 'DiscoBot')
-rw-r--r--DiscoBot/DSA_Game/Save/SaveCommand.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/DiscoBot/DSA_Game/Save/SaveCommand.cs b/DiscoBot/DSA_Game/Save/SaveCommand.cs
index 8566076..cd44534 100644
--- a/DiscoBot/DSA_Game/Save/SaveCommand.cs
+++ b/DiscoBot/DSA_Game/Save/SaveCommand.cs
@@ -6,6 +6,7 @@ using System.Threading.Tasks;
namespace DiscoBot.DSA_Game.Save
{
+ using System.Diagnostics;
using System.IO;
using System.Net;
using System.Net.Http;
@@ -66,9 +67,13 @@ namespace DiscoBot.DSA_Game.Save
private string[] ListSessions()
{
- return Directory.GetDirectories(Session.DirectoryPath);
- }
-
+ string[] dirs = Directory.GetDirectories(Session.DirectoryPath).OrderByDescending(x => new DirectoryInfo(x).LastAccessTime.Ticks).ToArray();
+ for (int i = 0; i < dirs.Length; i++)
+ {
+ dirs[i] += "; " + new DirectoryInfo(dirs[i]).LastAccessTime;
+ }
+ return dirs;
+ }
}
}