[Pkg] Rio: File-Kernel-kph.12.mcz
squeak-dev-noreply at lists.squeakfoundation.org
squeak-dev-noreply at lists.squeakfoundation.org
Thu Feb 26 14:01:38 UTC 2009
A new version of File-Kernel was added to project Rio:
http://www.squeaksource.com/Rio/File-Kernel-kph.12.mcz
==================== Summary ====================
Name: File-Kernel-kph.12
Author: kph
Time: 26 February 2009, 2:01:33 pm
UUID: f9a49742-040d-11de-a647-000a95edb42a
Ancestors: File-Kernel-kph.11
= file urls are always now correctly interpreted as full paths
+ recursive algorithm ignores '__MACOSX' directory
=============== Diff against File-Kernel-kph.11 ===============
Item was changed:
----- Method: FileLocalExecutive>>startAt:recursively:select:into: (in category 'executive actions') -----
startAt: aDir recursively: beRecursive select: selectBlock into: results
"Return a collection of rio's selected by passing
the directoryEntry array to the selectBlock.
The KernelRio implemetation of setStatFromEntryArray:
does not populate these rios with stat data.
Rio's more verbose implementation does.
This can be called with startAt: aString, but if so beRecursive must be false.
See primLookupEntryIn:index: for further details."
+ | index entryArray entry isDir fName |
- | index entryArray entry isDir |
index := 1.
[ (entryArray := self primLookupEntryIn: aDir asVmPathName index: index) notNil ]
whileTrue: [
#badDirectoryPath = entryArray ifTrue: [
^ results "(InvalidDirectoryError pathName: aDir value) signal" ].
isDir := entryArray at: 4.
+ fName := entryArray at: 1.
- (entry := aDir / (entryArray at: 1))
- setStatFromDir: aDir andEntryArray:entryArray.
+ fName ~= '__MACOSX' ifTrue: [
+ (entry := aDir / fName)
+ setStatFromDir: aDir andEntryArray:entryArray.
+
+ isDir ifFalse: [ entry := entry asFile ].
- isDir ifFalse: [ entry := entry asFile ].
+ (selectBlock value: entry) ifTrue: [ results add: entry ].
- (selectBlock value: entry) ifTrue: [ results add: entry ].
+ (beRecursive and: [ isDir ])
+ ifTrue: [
+ self
+ startAt: entry
+ recursively: beRecursive
+ select: selectBlock
+ into: results
+ ].
+ ].
- (beRecursive and: [ isDir ])
- ifTrue: [
- self
- startAt: entry
- recursively: beRecursive
- select: selectBlock
- into: results
- ].
index := index + 1
].
^ results!
Item was changed:
----- Method: FileLocalExecutive class>>makeNew:from: (in category 'as yet unclassified') -----
makeNew: aClass from: path
| str |
+ str := (path beginsWith: 'file:///') ifTrue: [ (path allButFirst: 7) unescapePercents ] ifFalse: [ path ].
- str := (path beginsWith: 'file:///') ifTrue: [ (path allButFirst: 8) unescapePercents ] ifFalse: [ path ].
^ aClass executive: self current value: str !
More information about the Packages
mailing list