--- a/DirectoryStream.st Thu Sep 18 19:28:12 1997 +0200
+++ b/DirectoryStream.st Thu Sep 18 19:29:19 1997 +0200
@@ -627,10 +627,33 @@
"return true, if position is at end"
^ readAheadEntry == nil
+!
+
+isEmpty
+ "test for if the unread portion of the directory stream is empty.
+ This query changes the readPointer of the DirectoryStream"
+
+ |pos entry|
+
+ [self atEnd] whileFalse:[
+ entry := self nextLine.
+ entry asFilename isImplicit ifFalse:[
+ ^ false.
+ ]
+ ].
+ ^ true
+
+
+ "
+ (DirectoryStream directoryNamed:'/') isEmpty
+ (DirectoryStream directoryNamed:'/var/tmp') isEmpty
+ "
+
+ "Modified: 18.9.1997 / 18:05:31 / stefan"
! !
!DirectoryStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.37 1997-09-04 21:01:44 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/DirectoryStream.st,v 1.38 1997-09-18 17:29:19 stefan Exp $'
! !