Socket
Book a DemoInstallSign in
Socket

kubos-file-client

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kubos-file-client

A Node.js client for the KubOS file transfer protocol

0.6.3
latest
npmnpm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

kubos-file-client

This is a Node.js utility intended to work with the KubOS file transfer protocol.

How to use it

Uplinking a file

const { uplink } = require('kubos-file-client');
// Get a Node.js stream as an uplink destination:
const MyUplink = new SatUplinkSocket();
const myFilePath = '/usr/some/file/path.txt';

uplink(myFilePath, MyUplink)
	.then(() => {
		console.log(`finished uplinking ${myFilePath}`);
	})
	.catch(err => {
		console.log(`there was an error uplinking ${myFilePath}`);
		console.error(err);
	});

Downlinking a file

const { downlink } = require('kubos-file-client');
const MyDownlink = new SatDownlinkSocket();
const destinationPath = '/usr/home/local/destination/filepath.txt';
const targetLocation = '/remote/location/filepath.txt';
const uniqueId = getUniqueId();

downlink(uniqueId, destinationPath, targetLocation, MyDownlink)
	.then(filePath => {
		console.log(`file has been downlinked to ${filePath}`);
	})
	.catch(err => {
		console.log(`there was an error uplinking ${filePath}`);
		console.error(err);
	});
//

FAQs

Package last updated on 10 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.