using System;
using System.Threading;
using System.Threading.Tasks;
using Duplicati.Proprietary.DiskImage.Partition;
namespace Duplicati.Proprietary.DiskImage.Filesystem;
///
/// Filesystem operations interface.
///
public interface IFilesystem : IDisposable
{
///
/// Gets the supported filesystem type(s).
///
string SupportedType { get; }
///
/// Mounts a partition for filesystem access.
///
/// The partition to mount.
/// Cancellation token.
/// Volume handle for operations.
Task MountAsync(IPartition partition, CancellationToken cancellationToken);
///
/// Mounts a raw disk/partition without filesystem awareness.
///
/// The source to mount as raw volume.
/// Cancellation token.
/// Volume handle for raw access.
Task MountRawAsync(IPartition source, CancellationToken cancellationToken);
///
/// Detects the filesystem type of a partition.
///
/// The partition to check.
/// Cancellation token.
/// Detected filesystem type or null.
Task DetectFilesystemTypeAsync(IPartition partition, CancellationToken cancellationToken);
}