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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-ftp

v1.2.1

Published

This cordova plugin is created to use ftp (client) in web/js.

Downloads

73

Readme

cordova-plugin-ftp

Description

This cordova plugin is created to use ftp (client) in web/js.

Support both iOS and Android platform now.

You can do the following things:

  • List a directory
  • Create a directory
  • Delete a directory (must be empty)
  • Delete a file
  • Download a file (with percent info)
  • Upload a file (with percent info)
  • Cancel upload/download
  • Set SSL/TLS connection (only Android supported)
  • Judge is connected (only Android supported)

Installation

$ cordova plugin add cordova-plugin-ftp
$ cordova prepare

Dependency:

  • For iOS, the plugin depends on CFNetwork.framework, which has been added to plugin.xml, and cordova prepare will add it automatically to platform project. if not, add it by hand.
  • But for Android, it depends on com.android.support:support-v4:23.2.0, which should be added to your platform project by hand.

Usage

You can access this plugin by js object window.cordova.plugin.ftp or cordova.plugin.ftp.

Refer to test (include ftp4es6.js to show ES6 (ES2015) encapsulation) for usage example.

Refer to ftp.js for all available APIs and usages.

This plugin has been tested with:

  • Cordova 10.0
    • cordova-android 9.1.0
    • cordova-ios 6.2.0
  • Android 10.0 API 29 (built by Android Studio 4.1.1)
  • iOS 14.5 (built by Xcode 12.5)
  • Ftp server: vsftpd 3.0.3

Notice

  1. For iOS, connect will always succeed (even if username and password are incorrect), but it does NOT mean the later actions, e.g. ls... download will succeed too! So always check their errorCallback.
  2. Want to upload/download multiple files? The plugin (Android part) just inits one connection and transmits all files via it. If you use asychronous syntax (e.g. foreach) to start multiple upload/download in a short time, it may mess the transfer. Instead, you can try Promise or async to transmit one after one. Refer to index.js for ES6 Promise example.

Thanks

  • The iOS native implementing is based on GoldRaccoon.
  • The Android native implementing is based on ftp4j jar (LGPL).

License

Apache License 2.0. Refer to LICENSE.md for more info.