equal
deleted
inserted
replaced
110 attributes at:#fileSize put:(ftp sizeOf:path). |
110 attributes at:#fileSize put:(ftp sizeOf:path). |
111 attributes at:#baseName put:self pathSegments last. |
111 attributes at:#baseName put:self pathSegments last. |
112 attributes at:#uriInfo put:self printString. |
112 attributes at:#uriInfo put:self printString. |
113 |
113 |
114 stream := ftp getStreamFor:path. |
114 stream := ftp getStreamFor:path. |
115 aBlock value:stream optionalValue:attributes. |
115 aBlock value:stream optionalArgument:attributes. |
116 ] ensure:[ |
116 ] ensure:[ |
117 stream notNil ifTrue:[ |
117 stream notNil ifTrue:[ |
118 stream close. |
118 stream close. |
119 ]. |
119 ]. |
120 ]. |
120 ]. |
243 srcUri := self. |
243 srcUri := self. |
244 ]. |
244 ]. |
245 attributes at:#uriInfo put:srcUri. |
245 attributes at:#uriInfo put:srcUri. |
246 |
246 |
247 [ |
247 [ |
248 aBlock value:stream optionalValue:attributes |
248 aBlock value:stream optionalArgument:attributes |
249 ] ensure:[stream close]. |
249 ] ensure:[stream close]. |
250 |
250 |
251 renameBlock notNil ifTrue:[ |renameFilenameString| |
251 renameBlock notNil ifTrue:[ |renameFilenameString| |
252 renameFilenameString := renameBlock value:eachBaseName. |
252 renameFilenameString := renameBlock value:eachBaseName. |
253 "/ [ |
253 "/ [ |
282 "use FTPClient for now" |
282 "use FTPClient for now" |
283 |
283 |
284 self connectThenDo:[:ftp| |stream| |
284 self connectThenDo:[:ftp| |stream| |
285 [ |
285 [ |
286 stream := ftp putStreamFor:self path. |
286 stream := ftp putStreamFor:self path. |
287 aBlock value:stream optionalValue:self class attributes. |
287 aBlock value:stream optionalArgument:self class attributes. |
288 ] ensure:[ |
288 ] ensure:[ |
289 stream notNil ifTrue:[ |
289 stream notNil ifTrue:[ |
290 stream close. |
290 stream close. |
291 ]. |
291 ]. |
292 ]. |
292 ]. |
353 self publicPrintOn:infoStream. |
353 self publicPrintOn:infoStream. |
354 self error:('FTP write: Datei %1 already exists!!' bindWith:infoStream contents). |
354 self error:('FTP write: Datei %1 already exists!!' bindWith:infoStream contents). |
355 ]. |
355 ]. |
356 stream := ftp putStreamFor:toPath. |
356 stream := ftp putStreamFor:toPath. |
357 ]. |
357 ]. |
358 aBlock value:stream optionalValue:self class attributes. |
358 aBlock value:stream optionalArgument:self class attributes. |
359 stream close. |
359 stream close. |
360 doAtomic ifTrue:[ |
360 doAtomic ifTrue:[ |
361 ftp rename:toPath to:path |
361 ftp rename:toPath to:path |
362 ]. |
362 ]. |
363 ] ifCurtailed:[ |
363 ] ifCurtailed:[ |
404 ! ! |
404 ! ! |
405 |
405 |
406 !FtpURI class methodsFor:'documentation'! |
406 !FtpURI class methodsFor:'documentation'! |
407 |
407 |
408 version |
408 version |
409 ^ '$Header: /cvs/stx/stx/libbasic2/FtpURI.st,v 1.19 2013-06-04 10:15:13 cg Exp $' |
409 ^ '$Header: /cvs/stx/stx/libbasic2/FtpURI.st,v 1.20 2014-12-02 14:22:35 stefan Exp $' |
410 ! ! |
410 ! ! |
411 |
411 |