repo.or.cz
/
cslatevm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog
|
commit
| commitdiff |
tree
|
edit
|
fork
raw
|
patch
(parent:
2a0c4ac
)
Implemented #contents on File using minimal primitive calls.
author
Brian T. Rice
<briantrice@gmail.com>
Thu, 18 Mar 2010 04:00:24 +0000 (21:00 -0700)
committer
Brian T. Rice
<briantrice@gmail.com>
Thu, 18 Mar 2010 04:00:24 +0000 (21:00 -0700)
src/core/file.slate
patch
|
blob
|
blame
|
history
diff --git
a/src/core/file.slate
b/src/core/file.slate
index
40cbf4a
..
e214501
100644
(file)
--- a/
src/core/file.slate
+++ b/
src/core/file.slate
@@
-599,6
+599,16
@@
file."
s
].
+f@(File traits) contents
+[
+ f sessionDo: [| :in size result |
+ size: f size.
+ result: (String newSize: size).
+ (in read: size into: result).
+ result
+ ]
+].
+
fs@(File Stream traits) file
[fs resource].