|
Class: SftpURI
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
accessing
-
schemes
-
ftp requests
-
pathExists: aPathname ftpClient: aFtpClient
-
defaults
-
defaultPort
-
answer the default ssh port here
-
defaultUser
-
ftp requests
-
connectThenDo: aOneArgBlock
-
setup a ftp connection and call aOneArgBlock with it.
Ensures that the sftp connection is closed afterwards.
stream access
-
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
].
|
-
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)
-
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)
-
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)
-
writeStreamDo: aBlock
-
use FTPClient for now
usage example(s):
'ftp://stefan:password@hippo/etc/group' asURI writeStreamDo:[:stream :attributes |
self halt
].
|
-
writeStreamDo: aBlock create: doCreate
-
-
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
-
exists
-
does the file represented by this uri exist?
establish a connection for try to get a readStream
-
isAbsolute
-
there is nothing like a relative ftp URI
-
isRemote
-
return true, if this is a remote URI
WriteStreamSimulator
|