Initial commit: Lagerbestand Blazor Projekt

This commit is contained in:
spaethf committed 2026-09-21 21:28:23 +02:00
commit cba9414e92
105 files changed
+36431

No files matched your search

@@ -0,0 +1,49 @@
using Lagerbestand.Models;
namespace Lagerbestand.Services;
/// <summary>
/// Service interface for file storage operations (disk/NFS based)
/// </summary>
public interface IFileStorageService
{
/// <summary>
/// Gets the current storage settings
/// </summary>
Task<FileStorageSettings> GetSettingsAsync();
/// <summary>
/// Updates the storage settings
/// </summary>
Task SaveSettingsAsync(FileStorageSettings settings);
/// <summary>
/// Validates if the storage path is accessible and writable
/// </summary>
Task<(bool IsValid, string? ErrorMessage)> ValidateStoragePathAsync(string path);
/// <summary>
/// Saves a file to storage and returns the relative path
/// </summary>
Task<string> SaveFileAsync(byte[] content, string fileName, string subDirectory = "attachments");
/// <summary>
/// Reads a file from storage
/// </summary>
Task<byte[]?> ReadFileAsync(string relativePath);
/// <summary>
/// Deletes a file from storage
/// </summary>
Task<bool> DeleteFileAsync(string relativePath);
/// <summary>
/// Checks if a file exists in storage
/// </summary>
Task<bool> FileExistsAsync(string relativePath);
/// <summary>
/// Gets the file size in bytes
/// </summary>
Task<long> GetFileSizeAsync(string relativePath);
}