--- a/FileURI.st Thu Aug 12 12:31:52 2010 +0200
+++ b/FileURI.st Thu Aug 12 12:32:06 2010 +0200
@@ -9,7 +9,6 @@
other person. No title to or ownership of the software is
hereby transferred.
"
-
"{ Package: 'stx:libbasic2' }"
HierarchicalURI subclass:#FileURI
@@ -166,10 +165,10 @@
- a collection with a stream on a single file,
- or a collection with streams on a directorie's files, but not recursive"
- self readStreamsDo:aBlock renameBlock:nil.
+ self readStreamsDo:aBlock filterBlock:nil renameBlock:nil.
!
-readStreamsDo:aBlock renameBlock:renameBlock
+readStreamsDo:aBlock filterBlock:oneArgFilterBlock renameBlock:renameBlock
"evaluate the block with a Collection of streams as first argument
and a dictionary containing attributes as second argument,
- a collection with a stream on a single file,
@@ -208,6 +207,10 @@
].
].
+ oneArgFilterBlock notNil ifTrue:[
+ files := files select:oneArgFilterBlock
+ ].
+
files do:[:eachFilename| |baseName stream|
[
baseName := eachFilename baseName.
@@ -336,10 +339,11 @@
].
"
- (URI fromString:'file:/home/tm/tmp')
- readStreamsDo:[:stream :attributes|
- Transcript showCR:(attributes at:#MIME).
- Transcript showCR:(stream isWritable).
+ (URI fromString:'file:/~')
+ readStreamsDo:[:stream :attributes|
+ stream notNil ifTrue:[
+ Transcript show(attributes at:#MIME); tab; showCR:(stream isWritable).
+ ].
].
"
! !
@@ -347,5 +351,9 @@
!FileURI class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic2/FileURI.st,v 1.14 2005-02-01 12:42:02 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic2/FileURI.st,v 1.15 2010-08-12 10:32:06 stefan Exp $'
+!
+
+version_CVS
+ ^ '$Header: /cvs/stx/stx/libbasic2/FileURI.st,v 1.15 2010-08-12 10:32:06 stefan Exp $'
! !