0.3.18 • Published 4 years ago

node-mtp v0.3.18

Weekly downloads
4
License
BSD-2-Clause
Repository
github
Last release
4 years ago

node-mtp

Access devices over MTP using Node.js

Introduction

On some operating systems (e.g. macOS) devices like modern Android phones do not mount as disk drives without using external software, like Android File Transfer or OSXFUSE. node-mtp allows Node.js (v10 or higher) and Electron apps (v3.0.0 or higher) to read files from devices over MTP without requiring additional software or drivers.

node-mtp is an N-API wrapper around the libmtp library. It uses version 3 of N-API which is only available on Node v10 and higher.

Usage

const mtp = require('node-mtp');

mtp.attach();

const list = mtp.getFileListing();
console.log('Files:', list);

mtp.getFile(8, 'test.jpg'); // <file id>, <destination>

mtp.release();

Building

To build this on your own machine, you'll need libmtp:

  • Ubuntu: sudo apt-get install libmtp-dev
  • macOS: brew install libmtp

Updating on Yarn/NPM

The following steps will update the module on Yarn/NPM:

  • yarn version
  • git push && git push --tags
  • Wait for Travis to finish.
  • Download the releases from Github: prebuildify-ci download
  • npm publish

Note that you need to yarn global add prebuildify-ci to get the prebuilds.

0.3.18

4 years ago

0.3.17

4 years ago

0.3.16

4 years ago

0.3.15

4 years ago

0.3.14

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

6 years ago

0.1.13

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago