Filename.st
branchjv
changeset 17976 50c2416f962a
parent 17966 8b5df02e171f
child 17993 956342c369a2
--- a/Filename.st	Mon Oct 29 17:05:17 2012 +0000
+++ b/Filename.st	Mon Oct 29 22:07:56 2012 +0000
@@ -5321,30 +5321,30 @@
     
     ^ self 
         readingFileDo:[:s | 
-            |nBytes bytes n|
+            |nBytes bytes n result|
 
             s binary.
             nBytes := self fileSize.
             (nBytes notNil and:[ nBytes ~~ 0 ]) ifTrue:[
                 bytes := ByteArray uninitializedNew:nBytes.
-                n := s 
-                            nextBytes:nBytes
-                            into:bytes
-                            startingAt:1.
+                n := s nextBytes:nBytes into:bytes startingAt:1.
                 n == nBytes ifTrue:[
-                    bytes
+                    result := bytes
                 ] ifFalse:[
-                    bytes copyTo:n
+                    result := bytes copyTo:n
                 ]
             ] ifFalse:[
-                s contentsOfEntireFile
-            ]
+                result := s contentsOfEntireFile
+            ].
+            result
         ]
 
     "
      'Makefile' asFilename binaryContentsOfEntireFile
      'foobar' asFilename binaryContentsOfEntireFile   
     "
+
+    "Modified: / 27-10-2012 / 19:42:07 / cg"
 !
 
 contents
@@ -5875,15 +5875,15 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.378 2012/08/10 10:49:56 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.379 2012/10/27 17:44:35 cg Exp $'
 !
 
 version_CVS
-    ^ '§Header: /cvs/stx/stx/libbasic/Filename.st,v 1.378 2012/08/10 10:49:56 stefan Exp §'
+    ^ '§Header: /cvs/stx/stx/libbasic/Filename.st,v 1.379 2012/10/27 17:44:35 cg Exp §'
 !
 
 version_SVN
-    ^ '$Id: Filename.st 10844 2012-09-07 16:24:32Z vranyj1 $'
+    ^ '$Id: Filename.st 10858 2012-10-29 22:07:56Z vranyj1 $'
 ! !
 
 Filename initialize!