A wrapper object for an SFTP session running over and existing SSH connection. Use the OpenSFTP() method
of a previously connected and authenticated %Net.SSH.Session to instantiate a valid SFTP object for use.
You should NOT create instances of %Net.SSH.SFTP directly!
NOTE: %Net.SSH is currently not supported on OpenVMS platforms.
Inherited description: This callback method is invoked by the %New() method to
provide notification that a new instance of an object is being created.
If this method returns an error then the object will not be created.
It is passed the arguments provided in the %New call.
When customizing this method, override the arguments with whatever variables and types you expect to receive from %New().
For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:
Method %OnNew(dob as %Date = "", name as %Name = "") as %Status
If instead of returning a %Status code this returns an oref and this oref is a subclass of the current
class then this oref will be the one returned to the caller of %New method.
method CloseSFTP() as %Status [ Language = objectscript ]
Enumerate the contents of a directory. Populates the contents array with $LIST entries for
each file in the directory, subscripted by a integer sequence, the $LIST is composed in the same
format as with the FileInfo() method.
The optional spec parameter allows for wildcards when searching the directory. The wildcards
that can be used are as follows:
Enumerate the contents of a directory by calling the specified instance method once for each entry
in the directory. The signature of the callback should take two arguments, first an integer
sequence number and secondly a $LIST composed in the same format as with the FileInfo() method
Gets information about a file. On return, info is a $LIST containing:
3) File type
P: Named pipe (FIFO)
C: Character special
B: Block special
F: Regular file
L: Symbolic link
7) Last Access Time
8) Last Modification Time
Depending on the remote system, some information may not be available and
will be indicated by a null list element.
Get a file from the remote system, storing it in the stream.
If stream not defined on entry it will create a stream for this automatically. If stream
is a file stream we will just link to the file we created.
classmethod H2UTCFileTime(horolog As %String) as %Integer [ Language = objectscript ]
Convert $HOROLOG to UNIX file time; note that UNIX time is the number of seconds since Midnight Jan 1, 1970
which has a $HOROLOG date of 47117,0
method MkDir(directory As %String, remotemode As %String = "0700") as %Status [ Language = objectscript ]
Create a new directory on the remote server, with the specified file mode (access).
classmethod Permissions2Text(permissions As %Integer) as %String [ Language = objectscript ]