https://github.com/shiffman/sftp-processing
SFTP Library for Processing
https://github.com/shiffman/sftp-processing
Last synced: about 2 months ago
JSON representation
SFTP Library for Processing
- Host: GitHub
- URL: https://github.com/shiffman/sftp-processing
- Owner: shiffman
- Created: 2019-08-07T16:25:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-07T16:34:56.000Z (almost 6 years ago)
- Last Synced: 2025-04-06T09:46:59.027Z (2 months ago)
- Language: Java
- Size: 172 KB
- Stars: 21
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SFTP Library for Processing
The library uses JSch (Java Secure Channel).
Copyright (c) 2002,2003,2004,2005,2006,2007 Atsuhiko Yamanaka, JCraft, Inc.
```java
import sftp.*;Sftp sftp;
void setup() {
size(200,200);
background(0);
// Create the SFTP object
// if 3rd arg = false, you must set the password in your code
// if 3rd arg = true, you will be prompted to enter your password
sftp = new Sftp("www.hostname.com","login", true);
// sftp.setPassword("XXXXXX");
sftp.start(); // start the thread
noLoop();
}void mousePressed() {
// At any point you can execute an SFTP command
// Not all commands are currently implemented
// but you do have "ls" and "get"
// Gosh, I should implement "put", sorry!
sftp.executeCommand("ls");
sftp.executeCommand("get file.txt");
}
```