diff options
Diffstat (limited to 'Duplicati/Library/Backend/Tardigrade/TardigradeFile.cs')
-rw-r--r-- | Duplicati/Library/Backend/Tardigrade/TardigradeFile.cs | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/Duplicati/Library/Backend/Tardigrade/TardigradeFile.cs b/Duplicati/Library/Backend/Tardigrade/TardigradeFile.cs deleted file mode 100644 index 794e427e0..000000000 --- a/Duplicati/Library/Backend/Tardigrade/TardigradeFile.cs +++ /dev/null @@ -1,56 +0,0 @@ -using Duplicati.Library.Interface; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Duplicati.Library.Backend.Tardigrade -{ - public class TardigradeFile : IFileEntry - { - public static readonly string TARDIGRADE_LAST_ACCESS = "DUPLICATI:LAST-ACCESS"; - public static readonly string TARDIGRADE_LAST_MODIFICATION = "DUPLICATI:LAST-MODIFICATION"; - public bool IsFolder { get; set; } - - public DateTime LastAccess { get; set; } - - public DateTime LastModification { get; set; } - - public string Name { get; set; } - - public long Size { get; set; } - - public TardigradeFile() - { - - } - - public TardigradeFile(uplink.NET.Models.Object tardigradeObject) - { - IsFolder = tardigradeObject.IsPrefix; - var lastAccess = tardigradeObject.CustomMetaData.Entries.Where(e => e.Key == TARDIGRADE_LAST_ACCESS).FirstOrDefault(); - if (lastAccess != null && !string.IsNullOrEmpty(lastAccess.Value)) - { - LastAccess = DateTime.Parse(lastAccess.Value); - } - else - { - LastAccess = DateTime.MinValue; - } - - var lastMod = tardigradeObject.CustomMetaData.Entries.Where(e => e.Key == TARDIGRADE_LAST_MODIFICATION).FirstOrDefault(); - if (lastMod != null && !string.IsNullOrEmpty(lastMod.Value)) - { - LastModification = DateTime.Parse(lastMod.Value); - } - else - { - LastModification = DateTime.MinValue; - } - - Name = tardigradeObject.Key; - Size = tardigradeObject.SystemMetaData.ContentLength; - } - } -} |