mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Add Device List functionality and remote connection support
This commit is contained in:
@@ -39,13 +39,13 @@ using Sentry;
|
||||
namespace Aaru.Devices.Linux;
|
||||
|
||||
[SupportedOSPlatform("linux")]
|
||||
static class ListDevices
|
||||
public static class ListDevices
|
||||
{
|
||||
const string PATH_SYS_DEVBLOCK = "/sys/block/";
|
||||
|
||||
/// <summary>Gets a list of all known storage devices on Linux</summary>
|
||||
/// <returns>List of devices</returns>
|
||||
internal static DeviceInfo[] GetList()
|
||||
public static DeviceInfo[] GetList()
|
||||
{
|
||||
string[] sysdevs = Directory.GetFileSystemEntries(PATH_SYS_DEVBLOCK, "*", SearchOption.TopDirectoryOnly);
|
||||
|
||||
@@ -66,7 +66,7 @@ static class ListDevices
|
||||
hasUdev = false;
|
||||
}
|
||||
|
||||
for(int i = 0; i < sysdevs.Length; i++)
|
||||
for(var i = 0; i < sysdevs.Length; i++)
|
||||
{
|
||||
devices[i] = new DeviceInfo
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@ using Marshal = System.Runtime.InteropServices.Marshal;
|
||||
namespace Aaru.Devices.Windows;
|
||||
|
||||
[SupportedOSPlatform("windows")]
|
||||
static class ListDevices
|
||||
public static class ListDevices
|
||||
{
|
||||
/// <summary>Converts a hex dump string to the ASCII string it represents</summary>
|
||||
/// <param name="hex">Hex dump</param>
|
||||
@@ -63,7 +63,7 @@ static class ListDevices
|
||||
/// <summary>Gets a list of all known storage devices on Windows</summary>
|
||||
/// <returns>List of devices</returns>
|
||||
[SuppressMessage("ReSharper", "RedundantCatchClause")]
|
||||
internal static DeviceInfo[] GetList()
|
||||
public static DeviceInfo[] GetList()
|
||||
{
|
||||
var deviceIDs = new List<string>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user