using System.Collections.Generic; using Cosmos.System.FileSystem.Listing; using System.IO; namespace Cosmos.System.FileSystem.VFS { /// /// Virtual file system base abstract class. /// public abstract class VFSBase { /// /// Initializes the system. /// public abstract void Initialize(); /// /// Register file system. /// /// A file system to register. public abstract void RegisterFileSystem(FileSystemFactory aFileSystemFactory); /// /// Create File. /// /// A path to the file. /// DirectoryEntry value. public abstract DirectoryEntry CreateFile(string aPath); /// /// Create directory. /// /// A path to the directory. /// DirectoryEntry value. public abstract DirectoryEntry CreateDirectory(string aPath); /// /// Delete File. /// /// A path to the file. /// bool value. public abstract bool DeleteFile(DirectoryEntry aPath); /// /// Delete directory. /// /// A path to the directory. /// bool value. public abstract bool DeleteDirectory(DirectoryEntry aPath); /// /// Get directory. /// /// A path to the directory. /// DirectoryEntry value. public abstract DirectoryEntry GetDirectory(string aPath); /// /// Get file. /// /// A path to the file. /// DirectoryEntry value. public abstract DirectoryEntry GetFile(string aPath); /// /// Get directory listing. /// /// A path to the entry. /// DirectoryEntry list value. public abstract List GetDirectoryListing(string aPath); /// /// Get directory listing. /// /// A entry. /// DirectoryEntry list value. public abstract List GetDirectoryListing(DirectoryEntry aEntry); /// /// Get volume. /// /// A volume root path. /// DirectoryEntry value. public abstract DirectoryEntry GetVolume(string aVolume); /// /// Get list of directory entrys for all volumes. /// /// DirectoryEntry list value. public abstract List GetVolumes(); /// /// Gets the attributes for a File / Directory. /// /// The path of the File / Directory. /// FileAttributes value. public abstract FileAttributes GetFileAttributes(string aPath); /// /// Sets the attributes for a File / Directory. /// /// The path of the File / Directory. /// The attributes of the File / Directory. public abstract void SetFileAttributes(string aPath, FileAttributes fileAttributes); /// /// Get the directory separator char. /// public static char DirectorySeparatorChar { get { return '\\'; } } /// /// Get the alt. directory separator char. /// public static char AltDirectorySeparatorChar { get { return '/'; } } /// /// Get the volume separator char. /// public static char VolumeSeparatorChar { get { return ':'; } } /// /// Check if drive id is valid. /// /// Drive id to check. /// bool value. public abstract bool IsValidDriveId(string driveId); /// /// Get the total size of the partition. /// /// A drive id. /// long value. public abstract long GetTotalSize(string aDriveId); /// /// Get avilable free space in the partition. /// /// A drive id. /// long value. public abstract long GetAvailableFreeSpace(string aDriveId); /// /// Get total free space in the partition. /// /// A drive id. /// long value. public abstract long GetTotalFreeSpace(string aDriveId); /// /// Get file system type. /// /// A drive id. /// string value. public abstract string GetFileSystemType(string aDriveId); /// /// Get file system label. /// /// A drive id. /// string value. public abstract string GetFileSystemLabel(string aDriveId); /// /// Set file system type. /// /// A drive id. /// A label to be set. public abstract void SetFileSystemLabel(string aDriveId, string aLabel); /// /// Format partition. /// /// A drive id. /// A drive format. /// Quick format. public abstract void Format(string aDriveId, string aDriveFormat, bool aQuick); } }