WIP, abandoned: One-way backup tool with versioning and client-side encryption. Your precious data will never get lost!
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
namespace EternalArrowBackup.SourceStorage.InMemorySourceStorage
|
|
|
|
|
{
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using EternalArrowBackup.SourceStorage.Contracts;
|
|
|
|
|
|
|
|
|
|
internal class SourceFile : ISourceFile
|
|
|
|
|
{
|
|
|
|
|
public SourceFile(string filename, byte[] contents)
|
|
|
|
|
{
|
|
|
|
|
this.Filename = filename;
|
|
|
|
|
this.Size = contents.Length;
|
|
|
|
|
this.Contents = contents;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Filename { get; }
|
|
|
|
|
|
|
|
|
|
public long Size { get; }
|
|
|
|
|
|
|
|
|
|
private byte[] Contents { get; }
|
|
|
|
|
|
|
|
|
|
public Task<byte[]> ReadContents()
|
|
|
|
|
{
|
|
|
|
|
return Task.Run(() => this.Contents);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|