eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'SftpURI':

Home

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

Class: SftpURI


Inheritance:

   Object
   |
   +--URI
      |
      +--HierarchicalURI
         |
         +--SftpURI

Package:
stx:libbasic2
Category:
Net-Resources
Version:
rev: 1.8 date: 2019/03/18 10:03:59
user: cg
file: SftpURI.st directory: libbasic2
module: stx stc-classLibrary: libbasic2

Class protocol:

accessing
o  schemes

ftp requests
o  pathExists: aPathname ftpClient: aFtpClient


Instance protocol:

defaults
o  defaultPort
answer the default ssh port here

o  defaultUser

ftp requests
o  connectThenDo: aOneArgBlock
setup a ftp connection and call aOneArgBlock with it.
Ensures that the sftp connection is closed afterwards.

stream access
o  readStreamDo: aBlock
evaluate a block with the read stream as first argument
and a dictionary containing attributes as second argument.
The stream is closed after aBlock has been evaluated.

usage example(s):

     'ftp://stefan:password@ftp.exept.de/etc/group' asURI readStreamDo:[:stream :attributes | 
         self halt
      ].

o  readStreamsDo: aBlock
evaluate the block with a Collection of streams as first argument
and a dictionary containing attributes as second argument,
- a collection with a stream on a single file,
- or a collection with streams on a directory's files, but not recursive

The streams are closed after aBlock has been evaluated.
Attributes may be the mime type (key #MIME)

o  readStreamsDo: aBlock filterBlock: oneArgFilterBlock renameBlock: renameBlock
evaluate the block with a Collection of streams as first argument
and a dictionary containing attributes as second argument,
- a collection with a stream on a single file,
- or a collection with streams on a directory's files, but not recursive

The streams are closed after aBlock has been evaluated.
Attributes may be the mime type (key #MIME)

o  readStreamsDo: aBlock renameBlock: renameBlock
evaluate the block with a Collection of streams as first argument
and a dictionary containing attributes as second argument,
- a collection with a stream on a single file,
- or a collection with streams on a directorie's files, but not recursive

The streams are closed after aBlock has been evaluated.
Attributes may be the mime type (key #MIME)

o  writeStreamDo: aBlock
use FTPClient for now

usage example(s):

     'ftp://stefan:password@hippo/etc/group' asURI writeStreamDo:[:stream :attributes | 
         self halt
      ].

o  writeStreamDo: aBlock create: doCreate

o  writeStreamDo: aBlock create: doCreate atomic: doAtomic
use FTPClient for now.

If doCreate is true, a nonExistent directory will be created.
If doAtomic is true, files will appear atomically, by using
an intermediate file theat will be renamed

testing
o  exists
does the file represented by this uri exist?
establish a connection for try to get a readStream

o  isAbsolute
there is nothing like a relative ftp URI

o  isRemote
return true, if this is a remote URI


Private classes:

    WriteStreamSimulator


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 20:46:24 GMT