[Pkg] Rio: File-Base-kph.33.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Mon Jul 13 03:55:38 UTC 2009
A new version of File-Base was added to project Rio:
http://www.squeaksource.com/Rio/File-Base-kph.33.mcz
==================== Summary ====================
Name: File-Base-kph.33
Author: kph
Time: 13 July 2009, 4:55:36 am
UUID: ae63afe1-57b1-49b0-9b60-47c1456fd7ed
Ancestors: File-Base-mtf.32, File-Base-kph.28, File-Base-kph.29
merged
=============== Diff against File-Base-mtf.32 ===============
Item was added:
+ ----- Method: File>>symbolicLinkTo: (in category 'public modes') -----
+ symbolicLinkTo: dest
+
+ ^ executive from: self symbolicLinkTo: dest !
Item was changed:
----- Method: File>>contents (in category 'public file') -----
contents
+ "the error handler is to provide consistent experience between local files and remote if the file is not found"
+
+ [ self reader: [ :str | ^ str upToEnd ] ] on: TelnetProtocolError do: [ :ex | ^ nil ].
- self reader: [ :str | ^ str upToEnd ].
^ nil!
Item was changed:
----- Method: File>>ifAbsentDo: (in category 'testing') -----
ifAbsentDo: aBlock
+ ^ self exists ifFalse: [ aBlock value: self ] ifTrue: [ self ]!
- ^ self exists not ifTrue: [ aBlock value: self ] ifFalse: [ self ]!
Item was added:
+ ----- Method: File>>ifAbsent: (in category 'testing') -----
+ ifAbsent: aBlock
+
+ ^ self exists ifFalse: [ aBlock value: self ] ifTrue: [ self ]!
Item was changed:
----- Method: FileJpeg>>extent (in category 'as yet unclassified') -----
extent
| ext |
self beBinary reader: [ :str |
ext := JPEGReadWriter2 new imageExtent: (str next: 600)
].
+
+ (ext isNil or: [ (ext x = 0) and: [ ext y = 0 ]]) ifTrue: [ ^ nil ].
-
- ((ext x = 0) and: [ ext y = 0 ]) ifTrue: [ ^ nil ].
^ ext!
Item was changed:
+ ----- Method: FileFtpExecutive>>copyRemoteFile:toLocalFile: (in category 'ftp client') -----
- ----- Method: FileFtpExecutive>>copyRemoteFile:toLocalFile: (in category 'external ftp') -----
copyRemoteFile: aFile toLocalFile: bFile
+ | cmd |
+
-
File
ospIfWin:[ :os | aFile copyTo: bFile ]
+ ifUnix: [ :os |
+ os waitForCommand: (cmd := 'ftp -o "', bFile asVmPathName, '" "' , url asString , aFile, '"').
+ bFile exists ifFalse: [ self error: 'transfer failed: ', cmd]. ]
- ifUnix: [ :os | os waitForCommand: 'ftp -o "', bFile asVmPathName, '" "' , url asString , aFile, '"' ]
ifNone: [ aFile copyTo: bFile ]
!
Item was changed:
----- Method: File>>resolveMatchOne (in category 'enumeration') -----
resolveMatchOne
| list |
+
+ "if we do not contain wild cards, simply return self"
+ self pathHasNoWildCards ifTrue: [ ^ self ].
+
list :=self parent filesMatching: self fileName.
list size = 1 ifFalse: [ ^ nil ].
^ list first
!
Item was added:
+ ----- Method: File>>pathHasNoWildCards (in category 'enumeration') -----
+ pathHasNoWildCards
+ ^ ((value includes: $*) not and: [ (value includes: $#) not ]) !
More information about the Packages
mailing list