A new version of File-Kernel was added to project Rio: http://www.squeaksource.com/Rio/File-Kernel-kph.14.mcz
==================== Summary ====================
Name: File-Kernel-kph.14 Author: kph Time: 28 February 2009, 1:30:54 pm UUID: 0677ab8c-059c-11de-9b6f-000a95edb42a Ancestors: File-Kernel-kph.13
All non-archive tests pass
=============== Diff against File-Kernel-kph.13 ===============
Item was changed: ----- Method: FileExecutive>>toDirLocal:addAllLocal:relativeTo: (in category 'local/remote file copy') ----- toDirLocal: aDir addAllLocal: someFD relativeTo: aBaseDir
+ | map overwrite dest | - | map | - - map := self toDir: aDir mkpathAll: someFD relativeTo: aBaseDir.
+ overwrite := FileNotification signal isOverwrite. + + map := self toDir: aDir mkpathAll: someFD relativeTo: aBaseDir. + + ^ map collect: [ :ea | + dest := ea second. + (dest isDirectory not and: [ overwrite or: [ dest exists not ] ]) + ifTrue: [ + self copyLocalFile: ea first toLocalFile: dest + ]. + + dest + ]. - map do: [ :each | self copyLocalFile: each first toLocalFile: each second ]. + ! - ^ map collect: [ :ea | ea second ]!
Item was changed: ----- Method: FileLocalExecutive>>copyLocalFile:toLocalFile: (in category 'as yet unclassified') ----- copyLocalFile: aFile toLocalFile: bFile
+ | | + + self class OSProcessOrNil ifNotNilDo: [ :osp | + + osp waitForCommand: 'cp "', aFile asVmPathName, '" "', bFile asVmPathName, '"'. ^ aFile + + ]. - self class OSProcessOrNil ifNotNilDo: [ :osp | osp waitForCommand: 'cp "', aFile asVmPathName, '" "', bFile asVmPathName, '"'. ^ aFile].
(self primCopyFile: aFile asVmPathName to: bFile asVmPathName) = #failed ifTrue: [ ^ aFile copyTo: bFile ].
^ aFile
!
Item was added: + ----- Method: FileNotification>>isOverwrite (in category 'accessing') ----- + isOverwrite + "Answer the value of isOverwrite" + + ^ isOverwrite ifNil:[ false ]!
Item was added: + ----- Method: FileLocalDosExecutive class>>instanciatorFrom: (in category 'as yet unclassified') ----- + instanciatorFrom: aString + + "we being a dos file system have been asked to instancate a url, if that returns a FileLocalExecutive + we butt in" + + ^ (super instanciatorFrom: aString)!
Item was changed: ----- Method: FileExecutive>>toDir:mkpathAll:relativeTo: (in category 'local/remote file copy') ----- + toDir: aDir mkpathAll: someFD relativeTo: aBaseDir - toDir: aDir mkpathAll: someFD relativeTo: aBaseDir - "take the list of files and ensure that the directories exist, return sourceFile -> destFile map"
^ someFD collect: [ :aFileOrDir | Array with: aFileOrDir with: (self dir: aDir mkpath: aFileOrDir relativeTo: aBaseDir) ] - thenSelect: [ :ea | ea first isFile ]. !
Item was added: + ----- Method: FileNotification>>isOverwrite: (in category 'accessing') ----- + isOverwrite: anObject + "Set the value of isOverwrite" + + isOverwrite := anObject. + self resume: self.!
Item was added: + ----- Method: FileExecutive>>toDir:mkpathAll:relativeTo:overwriting: (in category 'local/remote file copy') ----- + toDir: aDir mkpathAll: someFD relativeTo: aBaseDir overwriting: flg + + "take the list of files and ensure that the directories exist, return sourceFile -> destFile map" + + ^ someFD + collect: [ :aFileOrDir | Array with: aFileOrDir with: (self dir: aDir mkpath: aFileOrDir relativeTo: aBaseDir overwriting: flg) ] + !
Item was added: + ----- Method: FileExecutive>>dir:mkpath:relativeTo:overwriting: (in category 'as yet unclassified') ----- + dir: aDir mkpath: aFileOrDir relativeTo: aBaseDirectory overwriting: flg + + | newFD | + + newFD := aBaseDirectory ifNil: [ (aDir / aFileOrDir fileName) asFile ] + ifNotNil: [ aDir / (aFileOrDir linearRelativeTo: aBaseDirectory) ]. + + aFileOrDir isDirectory ifTrue: [ newFD mkpath ]. + aFileOrDir isFile ifTrue: [ newFD parent mkpath ]. + + ^ newFD!
Item was added: + Notification subclass: #FileNotification + instanceVariableNames: 'isOverwrite' + classVariableNames: '' + poolDictionaries: '' + category: 'File-Kernel'!
Item was added: + ----- Method: FileNotification>>defaultAction (in category 'accessing') ----- + defaultAction + + "default action is to return self, since we carry the flags" + ^ self + + " + 'defaultAction' + FileNotification signal isOverwrite. + [ FileNotification signal isOverwrite ] on: FileNotification do: [ :ex | ex isOverwrite: true) ] + "!
Item was removed: - ----- Method: FileLocalExecutive>>copyFile:toLocalFile: (in category 'as yet unclassified') ----- - copyFile: aFile toLocalFile: bFile - - ^ self copyLocalFile: aFile toLocalFile: bFile - !
Item was removed: - ----- Method: FileLocalExecutive>>copyFile:toRemoteFile: (in category 'as yet unclassified') ----- - copyFile: aFile toRemoteFile: bFile - - ^ bFile executive copyLocalFile: aFile toRemoteFile: bFile!
packages@lists.squeakfoundation.org