public final class RemoteFile
extends java.lang.Object
Constructor and Description |
---|
RemoteFile() |
Modifier and Type | Method and Description |
---|---|
static boolean |
copyFromRemote(java.lang.String srcFile,
java.lang.String dstFile)
Copies a file from the remote device to the desktop.
|
static boolean |
copyToRemote(java.lang.String srcFile,
java.lang.String dstFile)
Copies a file from the desktop to the remote device, creating the target folder if necessary.
|
static boolean |
delete(java.lang.String fileOrFolder)
Deletes a remote file or an empty folder.
|
static int |
exec(java.lang.String command,
java.lang.String args,
int launchCode,
boolean wait)
Remotely executes the specified command on the connected device.
|
static java.lang.String[] |
listFiles(java.lang.String folder)
Lists the files contained in a folder.
The strings returned are the names of the files and directories contained within this folder. |
public static java.lang.String[] listFiles(java.lang.String folder)
builtin
(which is usually slot 1). Then, to copy to/from a slot, you must use slot:/full_path_to_file
(E.G.: 1:/dbs/myapp/MyPDBFile.pdb).public static boolean copyToRemote(java.lang.String srcFile, java.lang.String dstFile)
srcFile
- The file on the desktop.dstFile
- The target file on the remote device. Note: this CANNOT be a folder name, but the target file name
instead.public static boolean copyFromRemote(java.lang.String srcFile, java.lang.String dstFile)
srcFile
- The file on the remote device.dstFile
- The target file on the desktop. Note: this CANNOT be a folder name, but the target file name instead.public static boolean delete(java.lang.String fileOrFolder)
public static int exec(java.lang.String command, java.lang.String args, int launchCode, boolean wait)
command
- the command to executeargs
- command argumentslaunchCode
- ignored, use 0.wait
- ignored, use false.