Using the COM interface

You can interact with the GlobalSCAPE Secure FTP Server directly from your own custom applications using any COM enabled programming language such as Visual Basic (VB), Java, C++, and many others. You can create a script from the development IDE of your choice. To create a new script file, you need to have some familiarity with programming concepts and, ideally, some experience with a COM enabled programming language.

 

This article defines the COM Interface of the GlobalSCAPE Secure FTP Server. The COM interface consists of:

 

Notes

 

CIServer class

The SFTPCOMInterface.CIServer class is the only SFTPCOMServer class that user applications use directly. To start using the SFTP COM interface a user application should create the SFTPCOMInterface.CIServer class object, and then use its methods and properties.

Example

Set SFTPServer = CreateObject("SFTPCOMInterface.CIServer")

CIServer implements the ICIServer interface.

 

Interfaces

ICIServer interface

Use the ICIServer interface to access and manage Secure FTP Server and its attributes

 

ICISites Interface

Use the ICISites interface to list all sites, to add sites, and to find individual sites on the server.

It can be obtained by using the Sites method of the ICIServer interface.

Example

Set Sites = SFTPServer.Sites

 

ICISite Interface

Use the ICISite interface to manage individual FTP sites on the server. It can be obtained by using the Item and SiteByID methods of the ICISites interface.

Example

Set Site = Sites.Item(0)

 

IPermission Interface

Use the IPermission interface to set and manage folder permissons. Use the ICISite::GetFolderPermissions method to get folder permissions.

Example

aPerm = s.GetFolderPermissions("\pub\")

Use the ICISite::GetBlankPermission method to get blank folder permissions.

Example

Set p = s.GetBlankPermission("\pub\"), "Administrative")

Note

Once you have changed properties with IPermission you must call the ICISite::SetPermission method to apply your changes or create new folder permissions.

 

ICIClientSettings Interface

Use the ICIClientSettings interface to manage client user or client group settings. Use the ICISite::GetGroupSettings method to access the interface.

Example

Set gs = s.GetGroupSettings(s_gr)

or use the ICISite::GetUserSettings method.

Example

Set us = s.GetUserSettings(aUsr(j))

Note

When you call methods or change properties of the ICIClientSettings interface, you must call ICIServer's ApplyChanges method in order for the changes to take effect.

 

ICICommandSettings Interface

Use the ICICommandSettings interface to create or manage site custom commands. Use the ICISite::GetCommandSettings method to access the interface.

Example

Set cs = s.GetCommandSettings(aCommands(i))

Note

When you make changes with the ICICommandSettings interface the changes take effect immediately. You do not need to explicitly apply the changes.

 

ICICertInfo Interface

Use the ICICertInfo interface to obtain information about certificates. Use the ICISite::GetTrustedCertificateInfo method or the ICISite::GetPendingCertificateInfo method to access the interface.

Examples

Set ci = s.GetTrustedCertificateInfo(aCerts(i))

Set ci = s.GetPendingCertificateInfo(aCerts(i))

Note

All the properties of the ICICertInfo interface are read only.