java7-fs-box
This project is licensed under both LGPLv3 and ASL 2.0. See file LICENSE for more details.
What this is
This is an implementation of a Java 7
FileSystem
over
Box.com. This implementation is based on
java7-fs-base.
Note that it does not make use of the Android SDK (see here but of the new API.
Install
jars
selenium chrome driver (obsolete, use os default browser)
- Download the chromedriver executable and locate it into some directory.
- Don't forget to run jvm with jvm argument
-Dwebdriver.chrome.driver=/usr/local/bin/chromedriver
.
- Don't forget to run jvm with jvm argument
Usage
First, get box account, then create box app.
Next, prepare 2 property files.
- application credential
$ cat ${HOME}/.vavifuse/box.properties
box.applicationName=your_application_name
box.clientId=your_client_id
box.clientSecret=your_client_secret
box.redirectUrl=http://localhost:30001
box.scopes=root_readwrite
- user credential
$ cat ${HOME}/.vavifuse/credentials.properties
box.password.xxx@yyy.zzz=your_password
Then write your code! Here is a short example (imports omitted for brevity):
public class Main {
public static void main(String[] args) throws IOException {
String email = "xxx@yyy.zzz";
URI uri = URI.create("box:///?id=" + email);
FileSystem fs = FileSystems.newFileSystem(uri, env);
:
}
}
See also
TODO
dev token authenticator