UNPKG

drive-detector

Version:

Detect drives and changes in mounted drives.

40 lines (39 loc) 1 kB
/// <reference types="node" /> import { EventEmitter } from "events"; export default class DriveDetector extends EventEmitter { private interval; private drives; start(intervalMilliseconds?: number): void; stop(): void; list(): Promise<Array<IDrive>>; private checkDrives; private identifyMountedDrives; private identifyUnmountedDrives; } export interface IDrive { enumerator: string; busType: string; busVersion: string | null; device: string; devicePath: string; raw: string; description: string; error: Error | null; size: number; blockSize: number; logicalBlockSize: number; mountpoints: Array<IMountPoint>; isReadOnly: boolean | null; isSystem: boolean | null; isVirtual: boolean | null; isRemovable: boolean | null; isCard: boolean | null; isSCSI: boolean | null; isUSB: boolean | null; isUAS: boolean | null; } interface IMountPoint { path: string; label?: string; } export {};