rn-ftp-client
v0.1.1
Published
react-native-ftp new arch
Downloads
5
Readme
rn-ftp-client
React Native New Architecture - FTP client implementation for React Native (Android only), Coroutine inside.
- 🐎 New Architecture
- ⚡ Using light-weight thread
- 🏎 Kotlin implement
NOTE: Android only
Installation
Adding the package
npm
$ npm install rn-ftp-clientyarn
$ yarn add rn-ftp-clientExample
import { setup, list, uploadFile, downloadFile } from 'rn-ftp-client';
const _setUp = async () => {
setup(ip, 21, user, password).then((result) => {
console.log(result);
});
};
const _listFile = async () => {
const files = await list('.');
console.log('files' + files);
setResult(files);
return files;
};
const _uploadFile = async () => {
uploadFile('/sdcard/Download/testpic.png', './testpic.png')
.then((value) => console.log(value))
.catch((e) => console.log('error', e));
};
const _downloadFile = async () => {
downloadFile('/sdcard/Download/testpic4.png', './testpic.png').catch(
(e) => console.log('error', e)
);
};Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
