Skip to main content

StorageController Class

Package: GHIElectronics.Endpoint.Devices.Storage
Namespace: GHIElectronics.Endpoint.Devices.Storage

The SD card slot or the USB drives. Events come on the library's storage thread. A drive that is pulled out is unmounted by the library. The SD card is at /media/sd/; USB drives get the first free /media/usbN/, as Windows gives the first free drive letter. A controller stays alive until it is disposed.

public sealed class StorageController : IDisposable

Properties​

Name​

public string Name { get; }

The name this controller was created with (e.g. EPM815.StorageController.SdCard).

Returns string

Methods​

Disable()​

public void Disable()

Stops reporting drives. Already-reported drives stay mounted; call FileSystem.Unmount to unmount them.

Dispose()​

public void Dispose()

Stops the events (one being delivered finishes first)

Enable()​

public void Enable()

Starts reporting drives: first the ones already plugged in

FromName(string name)​

public static StorageController FromName(string name)

EPM815.StorageController.SdCard or EPM815.StorageController.UsbHostMassStorage

Returns StorageController

Events​

ConnectionChanged​

public event ConnectionChangedEventHandler ConnectionChanged

A drive connected or disconnected