| Paste number 63255: | stream-position-setter for <file-stream> |
| Pasted by: | struppi |
| When: | 3 years, 7 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+1CT3 |
| Channel: | #dylan |
| Paste contents: |
Index: fundev/sources/system/file-system/file-stream.dylan =================================================================== --- fundev/sources/system/file-system/file-stream.dylan (Revision 11854) +++ fundev/sources/system/file-system/file-stream.dylan (Arbeitskopie) @@ -499,6 +499,19 @@ position end method; +define method stream-position-setter + (position == #"end", stream :: <file-stream>) + => (position :: <integer>); + stream-position(stream) + := stream-size(stream); +end method; + +define method stream-position-setter + (position == #"start", stream :: <file-stream>) + => (position :: <integer>); + stream-position(stream) := 0; +end method; + // Special for dood - avoids the overhead of adjust-stream-position, but // allows setting the position to extend the file, unlike // stream-position-setter.
This paste has no annotations.