A database based on .net
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.

32 lines
1.1 KiB

// Author: Gockner, Simon
// Created: 2020-01-24
// Copyright(c) 2020 SimonG. All Rights Reserved.
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace GBase.Interfaces.FileHandling
{
/// <summary>
/// Internal file handler
/// </summary>
public interface IFileHandler : IAsyncDisposable
{
/// <summary>
/// Initialize this <see cref="IFileHandler"/>
/// </summary>
/// <param name="path">The path of the database</param>
/// <param name="folderName"></param>
/// <param name="cancellationToken">A <see cref="CancellationToken"/> to cancel the asynchronous operation</param>
/// <returns>True if successful, false if not</returns>
List<IGBaseFile> Init(string path, string folderName, CancellationToken cancellationToken);
IGBaseFile CreateEntryFile<T>(T entry, IGBaseTable table);
Task<bool> DeleteEntryFile<T>(T entry);
Task<IGBaseFile> RequestEntryFile<T>(T entry);
}
}