eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FtpURI':

Home

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

Class: FtpURI


Inheritance:

   Object
   |
   +--URI
      |
      +--HierarchicalURI
         |
         +--FtpURI

Package:
stx:libbasic2
Category:
Net-Resources
Version:
rev: 1.21 date: 2019/03/18 10:01:52
user: cg
file: FtpURI.st directory: libbasic2
module: stx stc-classLibrary: libbasic2

Class protocol:

accessing
o  schemes

ftp requests
o  pathExists: aPathname ftpClient: aFtpClient


Instance protocol:

defaults
o  defaultPassword

o  defaultPort
answer the default command-port here

o  defaultUser

ftp requests
o  connectThenDo: aOneArgBlock
setup a ftp connection and call aOneArgBlock with it.
Ensures that the ftp 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 directorie'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  readStreamsDo: aBlock skipFilenamesWithSuffix: skipSuffix 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



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 09 Dec 2021 13:09:54 GMT