mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-19 04:18:43 +00:00
48 lines
1.4 KiB
C#
48 lines
1.4 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
|
|
using Cosmos.HAL.BlockDevice;
|
|
using Cosmos.System.FileSystem.Listing;
|
|
|
|
namespace Cosmos.System.FileSystem
|
|
{
|
|
public abstract class FileSystem
|
|
{
|
|
protected FileSystem(Partition aDevice, string aRootPath, long aSize)
|
|
{
|
|
Device = aDevice ?? throw new ArgumentNullException(nameof(aDevice));
|
|
RootPath = aRootPath ?? throw new ArgumentNullException(nameof(aRootPath));
|
|
Size = aSize;
|
|
}
|
|
|
|
public abstract void DisplayFileSystemInfo();
|
|
|
|
public abstract List<DirectoryEntry> GetDirectoryListing(DirectoryEntry baseDirectory);
|
|
|
|
public abstract DirectoryEntry GetRootDirectory();
|
|
|
|
public abstract DirectoryEntry CreateDirectory(DirectoryEntry aParentDirectory, string aNewDirectory);
|
|
|
|
public abstract DirectoryEntry CreateFile(DirectoryEntry aParentDirectory, string aNewFile);
|
|
|
|
public abstract void DeleteDirectory(DirectoryEntry aPath);
|
|
|
|
public abstract void DeleteFile(DirectoryEntry aPath);
|
|
|
|
protected Partition Device { get; }
|
|
|
|
public string RootPath { get; }
|
|
|
|
public long Size { get; }
|
|
|
|
public abstract long AvailableFreeSpace { get; }
|
|
|
|
public abstract long TotalFreeSpace { get; }
|
|
|
|
public abstract string Type { get; }
|
|
|
|
public abstract string Label { get; set; }
|
|
|
|
public abstract void Format(string aDriveFormat, bool aQuick);
|
|
}
|
|
}
|