eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SftpClient':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SftpClient


Inheritance:

   Object
   |
   +--SftpClient

Package:
stx:goodies/communication
Category:
Net-Communication-SFTP
Version:
rev: 1.15 date: 2018/05/22 16:27:19
user: stefan
file: SftpClient.st directory: goodies/communication
module: stx stc-classLibrary: communication

Instance protocol:

accessing
o  connection

o  connection: something

o  hostname

o  hostname: something

o  nextRequestId
answer the next unused requestId. Wrap around.

o  port

o  port: something

o  sourceIpAddress

o  sourceIpAddress: something

o  username

o  username: something

connecting
o  close

o  connect
(self new hostname:'exept.exept.de') connect
(self new hostname:'nonExistent') connect

o  connectString
(self new hostname:'localhost'; username:'ftp') connectString

direct access
o  cd: remotePath
self new hostname:'exeptn.bh.exept.de'; cd:'/tmp'

o  copyLocal: localFilename to: remoteFilename
self new hostname:'exept.exept.de'; copyLocal:'/etc/hosts' to:'/tmp'

o  copyRemote: remoteFilename to: localFilename
self new hostname:'exept.exept.de'; copyRemote:'/etc/hosts' to:'/tmp'

o  directoryContentsOf: remoteFilename
this is the command
usage example(s):
        self new hostname:'exeptn'; directoryContentsOf:''
        self new hostname:'exeptn'; directoryContentsOf:'/home/stefan'
        self new hostname:'exeptn'; directoryContentsOf:'/glump'

o  mkdir: remoteFilename
self new hostname:'exeptn'; mkdir:'/tmp/test'

o  nlist
self new hostname:'exeptn'; nlist

o  pwd
this is the command

o  remove: remoteFilename
self new hostname:'exept.exept.de'; remove:'/tmp/hosts'

o  rename: existingRemoteFilename to: newRemoteFilename
self new hostname:'exept.exept.de'; rename:'/tmp/hosts' to:'/tmp/h'

o  safeCopyLocal: localFilename to: remoteFilename
same as copyLocal, but use an intermediate file

o  sftpCommand: sftpCommand
Solaris ssh does not support '-b -' yet (2007-10-16)

o  version
this is the command
usage example(s):
        self new hostname:'exeptn.bh.exept.de'; version

errors
o  protocolError: description with: sftpPacket

protocol
o  directoryContentsFromHandle: sftpHandle
|sftpConnection|

sftpConnection := (self new hostname:'exept.exept.de') connect.
[
(sftpConnection openDirectory:'/etc') directoryContents
] ensure:[
sftpConnection close
]

o  initialHandshake
version number

o  openDirectory: aFilenameString
(self new hostname:'exept.exept.de') connect openDirectory:'/etc'

o  openFile: aFilenameString
desired-access
usage example(s):
        (self new hostname:'exept.exept.de') connect openFile:'/etc/hosts'  

reading packets
o  getNextPacket
read the next packet and return it without the length field

stream access
o  getStreamFor: aFilenameString


Private classes:

    SftpHandle
    SftpPacketBuilder


ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 04 Aug 2025 16:55:05 GMT