This is a WIP and still needs the restore part implemented. Not all resources are fully tested but basic elements work.
48 lines
1.5 KiB
C#
48 lines
1.5 KiB
C#
// Copyright (c) 2026 Duplicati Inc. All rights reserved.
|
|
|
|
using Duplicati.Library.Interface;
|
|
|
|
namespace Duplicati.Proprietary.GoogleWorkspace.SourceItems;
|
|
|
|
internal abstract class MetaEntryBase(string path, DateTime? createdUtc, DateTime? lastModificationUtc) : ISourceProviderEntry
|
|
{
|
|
public bool IsFolder => true;
|
|
|
|
public virtual bool IsMetaEntry => false;
|
|
|
|
public virtual bool IsRootEntry => false;
|
|
|
|
public DateTime CreatedUtc => createdUtc ?? DateTime.UnixEpoch;
|
|
|
|
public DateTime LastModificationUtc => lastModificationUtc ?? DateTime.UnixEpoch;
|
|
|
|
public string Path => path;
|
|
|
|
public long Size => -1;
|
|
public bool IsSymlink => false;
|
|
|
|
public string? SymlinkTarget => null;
|
|
|
|
public FileAttributes Attributes => FileAttributes.Directory;
|
|
|
|
public bool IsBlockDevice => false;
|
|
|
|
public bool IsCharacterDevice => false;
|
|
|
|
public bool IsAlternateStream => false;
|
|
public string? HardlinkTargetId => null;
|
|
|
|
public abstract IAsyncEnumerable<ISourceProviderEntry> Enumerate(CancellationToken cancellationToken);
|
|
|
|
public virtual Task<bool> FileExists(string filename, CancellationToken cancellationToken)
|
|
=> Task.FromResult(false);
|
|
|
|
public virtual Task<Dictionary<string, string?>> GetMinorMetadata(CancellationToken cancellationToken)
|
|
=> Task.FromResult(new Dictionary<string, string?>());
|
|
|
|
public Task<Stream> OpenRead(CancellationToken cancellationToken)
|
|
{
|
|
throw new NotImplementedException();
|
|
}
|
|
}
|