npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@simplysm/capacitor-plugin-usb-storage

v13.0.100

Published

Simplysm Package - Capacitor USB Storage Plugin

Downloads

6,674

Readme

@simplysm/capacitor-plugin-usb-storage

Simplysm Package - Capacitor USB Storage Plugin. Provides USB Mass Storage device access on Android via the libaums library, with IndexedDB-based browser emulation.

Installation

npm install @simplysm/capacitor-plugin-usb-storage

API Overview

USB Storage

| API | Type | Description | |-----|------|-------------| | UsbStorage | class | USB storage access plugin (static methods) | | UsbStoragePlugin | interface | Low-level Capacitor plugin interface for USB storage | | UsbDeviceInfo | interface | USB device information | | UsbDeviceFilter | interface | USB device filter (vendor/product ID pair) | | UsbFileInfo | interface | File/directory entry on USB device |


UsbDeviceInfo

| Field | Type | Description | |-------|------|-------------| | deviceName | string | Device name | | manufacturerName | string | Manufacturer name | | productName | string | Product name | | vendorId | number | USB vendor ID | | productId | number | USB product ID |

UsbDeviceFilter

| Field | Type | Description | |-------|------|-------------| | vendorId | number | USB vendor ID | | productId | number | USB product ID |

UsbFileInfo

| Field | Type | Description | |-------|------|-------------| | name | string | File or directory name | | isDirectory | boolean | Whether the entry is a directory |

UsbStoragePlugin

| Method | Signature | Description | |--------|-----------|-------------| | getDevices | () => Promise<{ devices: UsbDeviceInfo[] }> | Get connected USB devices | | requestPermissions | (options: UsbDeviceFilter) => Promise<{ granted: boolean }> | Request USB device permission | | checkPermissions | (options: UsbDeviceFilter) => Promise<{ granted: boolean }> | Check USB device permission | | readdir | (options: UsbDeviceFilter & { path: string }) => Promise<{ files: UsbFileInfo[] }> | Read directory from USB | | readFile | (options: UsbDeviceFilter & { path: string }) => Promise<{ data: string \| null }> | Read file from USB (base64) |

UsbStorage

Abstract class with static methods for USB Mass Storage access.

| Method | Signature | Description | |--------|-----------|-------------| | getDevices | () => Promise<UsbDeviceInfo[]> | Get list of connected USB devices | | requestPermissions | (filter: UsbDeviceFilter) => Promise<boolean> | Request USB device access permission | | checkPermissions | (filter: UsbDeviceFilter) => Promise<boolean> | Check USB device access permission | | readdir | (filter: UsbDeviceFilter, dirPath: string) => Promise<UsbFileInfo[]> | Read directory contents from USB device | | readFile | (filter: UsbDeviceFilter, filePath: string) => Promise<Bytes \| undefined> | Read file from USB device |

Usage Examples

List and read from USB device

import { UsbStorage } from "@simplysm/capacitor-plugin-usb-storage";

// List connected devices
const devices = await UsbStorage.getDevices();

if (devices.length > 0) {
  const filter = { vendorId: devices[0].vendorId, productId: devices[0].productId };

  // Request permission
  const granted = await UsbStorage.requestPermissions(filter);

  if (granted) {
    // Read directory
    const files = await UsbStorage.readdir(filter, "/");

    // Read a file
    const data = await UsbStorage.readFile(filter, "/document.txt");
  }
}