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

@capawesome/capacitor-asset-manager

v8.0.0

Published

Capacitor plugin to access native asset files.

Readme

@capawesome/capacitor-asset-manager

Capacitor plugin to access native asset files.

Features

We are proud to offer one of the most complete and feature-rich Capacitor plugins for asset management. Here are some of the key features:

  • 🖥️ Cross-platform: Supports Android and iOS.
  • 📂 Asset copying: Copy files or directories from app bundle to data directory.
  • 📄 File listing: List all files in asset directories.
  • 📖 File reading: Read asset files with Base64 or UTF-8 encoding.
  • 🔄 Bundle access: Direct access to native app bundle assets.
  • 🗂️ Directory operations: Handle both individual files and entire directories.
  • 📦 Multiple encodings: Support for Base64 and UTF-8 file reading.
  • 🔁 Up-to-date: Always supports the latest Capacitor version.

Missing a feature? Just open an issue and we'll take a look!

Newsletter

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our Capawesome Newsletter.

Compatibility

| Plugin Version | Capacitor Version | Status | | -------------- | ----------------- | -------------- | | 8.x.x | >=8.x.x | Active support |

Installation

npm install @capawesome/capacitor-asset-manager
npx cap sync

Configuration

No configuration required for this plugin.

Usage

import { Directory, Filesystem } from '@capacitor/filesystem';
import { AssetManager, Encoding } from '@capawesome/capacitor-asset-manager';

const copy = async () => {
  const { uri } = await Filesystem.getUri({
    directory: Directory.Cache,
    path: 'index.html'
  });
  await AssetManager.copy({
    from: 'public/index.html',
    to: uri
  });
};

const list = async () => {
  await AssetManager.list({
    path: 'public'
  });
};

const read = async () => {
  const { data } = await AssetManager.read({
    encoding: Encoding.Utf8,
    path: 'capacitor.config.json'
  });
  return JSON.parse(data);
};

API

copy(...)

copy(options: CopyOptions) => Promise<void>

Copy a file or directory from the app bundle to the app's data directory.

Only available on Android and iOS.

| Param | Type | | ------------- | --------------------------------------------------- | | options | CopyOptions |

Since: 7.0.0


list(...)

list(options?: ListOptions | undefined) => Promise<ListResult>

List files in a directory.

Only available on Android and iOS.

| Param | Type | | ------------- | --------------------------------------------------- | | options | ListOptions |

Returns: Promise<ListResult>

Since: 7.0.0


read(...)

read(options: ReadOptions) => Promise<ReadResult>

Read a file from the app bundle.

Attention: Reading large files can cause out of memory (OOM) issues. It is therefore recommended to copy files to the app's data directory using the copy method and read them from there using the fetch API.

Only available on Android and iOS.

| Param | Type | | ------------- | --------------------------------------------------- | | options | ReadOptions |

Returns: Promise<ReadResult>

Since: 7.0.0


Interfaces

CopyOptions

| Prop | Type | Description | Since | | ---------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | from | string | The source path to copy from. | 7.0.0 | | to | string | The destination path to copy to. Tip: Generate this path using the getUri(...) method of the Capacitor Filesystem plugin. | 7.0.0 |

ListResult

| Prop | Type | Description | Since | | ----------- | --------------------- | ----------------------------------- | ----- | | files | string[] | The list of files in the directory. | 7.0.0 |

ListOptions

| Prop | Type | Description | Since | | ---------- | ------------------- | -------------------------------------------------------------------------- | ----- | | path | string | The path to list files from. If not specified, the root path will be used. | 7.0.0 |

ReadResult

| Prop | Type | Description | Since | | ---------- | ------------------- | ------------------------ | ----- | | data | string | The content of the file. | 7.0.0 |

ReadOptions

| Prop | Type | Description | Default | Since | | -------------- | --------------------------------------------- | ------------------------------------------ | --------------------- | ----- | | encoding | Encoding | The encoding to use when reading the file. | 'base64' | 7.0.0 | | path | string | The path to read the file from. | | 7.0.0 |

Enums

Encoding

| Members | Value | Since | | ------------ | --------------------- | ----- | | Base64 | 'base64' | 7.0.0 | | Utf8 | 'utf8' | 7.0.0 |

Changelog

See CHANGELOG.md.

License

See LICENSE.