Servoy Properties Summary | |
---|---|
byte[] | data |
Boolean | isDirectory |
Boolean | isFile |
Boolean | isSymbolicLink |
Boolean | isUnknown |
String | name |
Number | size |
Date | timeStamp |
String | type |
Servoy Properties Details |
---|
data
byte[] data
Retrieve the contents of the file.Returns
byte[] the data byte[]
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
isDirectory
Boolean isDirectory
Returns true when the JFTPFile is a directory.Returns
Boolean result boolean
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
isFile
Boolean isFile
Returns true when it is a file.Returns
Boolean result boolean
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
isSymbolicLink
Boolean isSymbolicLink
Returns true when the file is a symbolic link.Returns
Boolean result boolean
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
isUnknown
Boolean isUnknown
Returns true when the file is of type directory.Returns
Boolean result boolean
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
name
String name
Get the name of the file.Returns
String name String
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
size
Number size
Get the size of the file.Returns
Number size long
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
timeStamp
Date timeStamp
Get the timestamp of the file.Returns
Date timestamp Date
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}
type
String type
Get the filetype of the file.Returns
String type String
Supported Clients
SmartClient, WebClient, NGClient
Sample
// Create a client for the JFTP connection
var vClient = plugins.it2be_ftp.createJFTPclient("host", "username", "password");
// 'Build' the connection and when the connection returns true
// start executing the rest of the code
if (vClient.connect()) {
// Check the status of the connection
application.output(vClient.getStatus());
// Create a list (array) of JFTPFiles
var vList = vClient.list();
// Loop through the JFTPFiles
for (var vIndex = 0 ; vIndex < vList.length ; vIndex++) {
// Retrieve the file at the selected index
var vFile = vList[vIndex];
// Output the name, size and timestamp of the JFTPFile
application.output(vFile.name + " - " + vFile.size + " - " + vFile.timeStamp);
// When the JFTPFile is of file type retrieve the data for it
// Here you could create a method to loop through the folder if
// the file type is a folder
if (vFile.isFile) {
vClient.get(vFile.name, "path/" + vFile.name);
}
}