[Pkg] Rio: File-Kernel-kph.18.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Tue Mar 3 14:07:29 UTC 2009
A new version of File-Kernel was added to project Rio:
http://www.squeaksource.com/Rio/File-Kernel-kph.18.mcz
==================== Summary ====================
Name: File-Kernel-kph.18
Author: kph
Time: 3 March 2009, 2:07:20 pm
UUID: 9cd2affc-07fc-11de-bb3d-000a95edb42a
Ancestors: File-Kernel-test.17
return the destinations from a bulk file transfer
=============== Diff against File-Kernel-test.17 ===============
Item was changed:
----- Method: FileExecutive>>toDirLocal:addAllLocal:relativeTo: (in category 'local/remote file copy') -----
toDirLocal: aDir addAllLocal: someFD relativeTo: aBaseDir
| map overwrite dest |
overwrite := FileNotification isOverwrite.
map := self toDir: aDir mkpathAll: someFD relativeTo: aBaseDir.
+ map do: [ :ea |
+ dest := ea value.
- ^ map collect: [ :ea |
- dest := ea second.
(dest isDirectory not and: [ overwrite or: [ dest exists not ] ])
ifTrue: [
+ self copyLocalFile: ea key toLocalFile: dest
+ ].
- self copyLocalFile: ea first toLocalFile: dest
].
+ "return all the destinations"
+ ^ map collect: [ :ea | ea value ]
+ !
- dest
- ].
-
- !
Item was changed:
----- Method: FileExecutive>>toDir:mkpathAll:relativeTo: (in category 'local/remote file copy') -----
toDir: aDir mkpathAll: someFD relativeTo: aBaseDir
"take the list of files and ensure that the directories exist, return sourceFile -> destFile map"
^ someFD
+ collect: [ :aFileOrDir | aFileOrDir -> (self dir: aDir mkpath: aFileOrDir relativeTo: aBaseDir) ]
- collect: [ :aFileOrDir | Array with: aFileOrDir with: (self dir: aDir mkpath: aFileOrDir relativeTo: aBaseDir) ]
!
Item was changed:
----- Method: FileLocalDosExecutive>>fullFor: (in category 'as yet unclassified') -----
fullFor: aRio
"the absolute path of this rio (with the current volume drive prepended), or if relative
combine with #homeDirectory to obtain the full path"
aRio value isEmpty ifTrue: [ ^ self homeDirectory ].
(self isFull: aRio) ifTrue: [ ^ aRio ].
"if we are an absolute path, prepend the volume"
aRio value first = self pathDelimiterChar ifTrue: [ ^ aRio newFrom: (self drive, aRio value) ].
+ ^ aRio newFrom: (self home, self class pathDelimiter, aRio value)
- ^ aRio newFrom: (home, self class pathDelimiter, aRio value)
!
More information about the Packages
mailing list