mirror of
https://github.com/aaru-dps/Aaru.CommonTypes.git
synced 2025-12-16 19:24:30 +00:00
Move to file scoped namespaces.
This commit is contained in:
@@ -43,83 +43,82 @@ using System.Text;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Structs;
|
||||
|
||||
namespace Aaru.CommonTypes.Interfaces
|
||||
namespace Aaru.CommonTypes.Interfaces;
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>Defines the interface to implement reading the contents of a filesystem</summary>
|
||||
public interface IReadOnlyFilesystem : IFilesystem
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>Defines the interface to implement reading the contents of a filesystem</summary>
|
||||
public interface IReadOnlyFilesystem : IFilesystem
|
||||
{
|
||||
/// <summary>Retrieves a list of options supported by the filesystem, with name, type and description</summary>
|
||||
IEnumerable<(string name, Type type, string description)> SupportedOptions { get; }
|
||||
/// <summary>Retrieves a list of options supported by the filesystem, with name, type and description</summary>
|
||||
IEnumerable<(string name, Type type, string description)> SupportedOptions { get; }
|
||||
|
||||
/// <summary>Supported namespaces</summary>
|
||||
Dictionary<string, string> Namespaces { get; }
|
||||
/// <summary>Supported namespaces</summary>
|
||||
Dictionary<string, string> Namespaces { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes whatever internal structures the filesystem plugin needs to be able to read files and directories
|
||||
/// from the filesystem.
|
||||
/// </summary>
|
||||
/// <param name="imagePlugin"></param>
|
||||
/// <param name="partition"></param>
|
||||
/// <param name="encoding">Which encoding to use for this filesystem.</param>
|
||||
/// <param name="options">Dictionary of key=value pairs containing options to pass to the filesystem</param>
|
||||
/// <param name="namespace">Filename namespace</param>
|
||||
ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
|
||||
Dictionary<string, string> options, string @namespace);
|
||||
/// <summary>
|
||||
/// Initializes whatever internal structures the filesystem plugin needs to be able to read files and directories
|
||||
/// from the filesystem.
|
||||
/// </summary>
|
||||
/// <param name="imagePlugin"></param>
|
||||
/// <param name="partition"></param>
|
||||
/// <param name="encoding">Which encoding to use for this filesystem.</param>
|
||||
/// <param name="options">Dictionary of key=value pairs containing options to pass to the filesystem</param>
|
||||
/// <param name="namespace">Filename namespace</param>
|
||||
ErrorNumber Mount(IMediaImage imagePlugin, Partition partition, Encoding encoding,
|
||||
Dictionary<string, string> options, string @namespace);
|
||||
|
||||
/// <summary>Frees all internal structures created by <see cref="Mount" /></summary>
|
||||
ErrorNumber Unmount();
|
||||
/// <summary>Frees all internal structures created by <see cref="Mount" /></summary>
|
||||
ErrorNumber Unmount();
|
||||
|
||||
/// <summary>Maps a filesystem block from a file to a block from the underlying device.</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="fileBlock">File block.</param>
|
||||
/// <param name="deviceBlock">Device block.</param>
|
||||
ErrorNumber MapBlock(string path, long fileBlock, out long deviceBlock);
|
||||
/// <summary>Maps a filesystem block from a file to a block from the underlying device.</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="fileBlock">File block.</param>
|
||||
/// <param name="deviceBlock">Device block.</param>
|
||||
ErrorNumber MapBlock(string path, long fileBlock, out long deviceBlock);
|
||||
|
||||
/// <summary>Gets the attributes of a file or directory</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="attributes">File attributes.</param>
|
||||
ErrorNumber GetAttributes(string path, out FileAttributes attributes);
|
||||
/// <summary>Gets the attributes of a file or directory</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="attributes">File attributes.</param>
|
||||
ErrorNumber GetAttributes(string path, out FileAttributes attributes);
|
||||
|
||||
/// <summary>Lists all extended attributes, alternate data streams and forks of the given file.</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">Path.</param>
|
||||
/// <param name="xattrs">List of extended attributes, alternate data streams and forks.</param>
|
||||
ErrorNumber ListXAttr(string path, out List<string> xattrs);
|
||||
/// <summary>Lists all extended attributes, alternate data streams and forks of the given file.</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">Path.</param>
|
||||
/// <param name="xattrs">List of extended attributes, alternate data streams and forks.</param>
|
||||
ErrorNumber ListXAttr(string path, out List<string> xattrs);
|
||||
|
||||
/// <summary>Reads an extended attribute, alternate data stream or fork from the given file.</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="xattr">Extended attribute, alternate data stream or fork name.</param>
|
||||
/// <param name="buf">Buffer.</param>
|
||||
ErrorNumber GetXattr(string path, string xattr, ref byte[] buf);
|
||||
/// <summary>Reads an extended attribute, alternate data stream or fork from the given file.</summary>
|
||||
/// <returns>Error number.</returns>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="xattr">Extended attribute, alternate data stream or fork name.</param>
|
||||
/// <param name="buf">Buffer.</param>
|
||||
ErrorNumber GetXattr(string path, string xattr, ref byte[] buf);
|
||||
|
||||
/// <summary>Reads data from a file (main/only data stream or data fork).</summary>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="offset">Offset.</param>
|
||||
/// <param name="size">Bytes to read.</param>
|
||||
/// <param name="buf">Buffer.</param>
|
||||
ErrorNumber Read(string path, long offset, long size, ref byte[] buf);
|
||||
/// <summary>Reads data from a file (main/only data stream or data fork).</summary>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="offset">Offset.</param>
|
||||
/// <param name="size">Bytes to read.</param>
|
||||
/// <param name="buf">Buffer.</param>
|
||||
ErrorNumber Read(string path, long offset, long size, ref byte[] buf);
|
||||
|
||||
/// <summary>Lists contents from a directory.</summary>
|
||||
/// <param name="path">Directory path.</param>
|
||||
/// <param name="contents">Directory contents.</param>
|
||||
ErrorNumber ReadDir(string path, out List<string> contents);
|
||||
/// <summary>Lists contents from a directory.</summary>
|
||||
/// <param name="path">Directory path.</param>
|
||||
/// <param name="contents">Directory contents.</param>
|
||||
ErrorNumber ReadDir(string path, out List<string> contents);
|
||||
|
||||
/// <summary>Gets information about the mounted volume.</summary>
|
||||
/// <param name="stat">Information about the mounted volume.</param>
|
||||
ErrorNumber StatFs(out FileSystemInfo stat);
|
||||
/// <summary>Gets information about the mounted volume.</summary>
|
||||
/// <param name="stat">Information about the mounted volume.</param>
|
||||
ErrorNumber StatFs(out FileSystemInfo stat);
|
||||
|
||||
/// <summary>Gets information about a file or directory.</summary>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="stat">File information.</param>
|
||||
ErrorNumber Stat(string path, out FileEntryInfo stat);
|
||||
/// <summary>Gets information about a file or directory.</summary>
|
||||
/// <param name="path">File path.</param>
|
||||
/// <param name="stat">File information.</param>
|
||||
ErrorNumber Stat(string path, out FileEntryInfo stat);
|
||||
|
||||
/// <summary>Solves a symbolic link.</summary>
|
||||
/// <param name="path">Link path.</param>
|
||||
/// <param name="dest">Link destination.</param>
|
||||
ErrorNumber ReadLink(string path, out string dest);
|
||||
}
|
||||
/// <summary>Solves a symbolic link.</summary>
|
||||
/// <param name="path">Link path.</param>
|
||||
/// <param name="dest">Link destination.</param>
|
||||
ErrorNumber ReadLink(string path, out string dest);
|
||||
}
|
||||
Reference in New Issue
Block a user