# HG changeset patch # User Claus Gittinger # Date 1074089270 -3600 # Node ID 5167f23f77f672b0ae8d73cfc6fc0b574e46c7d6 # Parent 4f2f905d1c935ab967f538f0a5cc33963d92fe16 comment diff -r 4f2f905d1c93 -r 5167f23f77f6 Filename.st --- a/Filename.st Wed Jan 14 14:04:57 2004 +0100 +++ b/Filename.st Wed Jan 14 15:07:50 2004 +0100 @@ -2003,7 +2003,7 @@ readStream "return a stream for reading from the file represented by the receiver. - If the file does not already exist, nil is returned." + Raises an error if the file does not exist." ^ FileStream readonlyFileNamed:(self osNameForAccess) @@ -2030,8 +2030,8 @@ readWriteStream "return a stream for read/write the file represented by the receiver. - If the file does not already exist, nil is returned. - If the file does exist, it is NOT truncated." + If the file does not already exist, it is created. + If the file does exist, it is NOT truncated, but rewritten at the beginning." ^ FileStream fileNamed:(self osNameForAccess) @@ -2042,11 +2042,12 @@ s nextPutAll:'1234567890'. s close. - s := '/tmp/foo' asFilename readWriteStream. + s := '/tmp/foo' asFilename readWriteStream. s nextPutAll:'abcdef'. s close. '/tmp/foo' asFilename contents + '/tmp/foo' asFilename remove " ! @@ -4985,7 +4986,7 @@ !Filename class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.270 2003-11-22 17:05:22 cg Exp $' + ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.271 2004-01-14 14:07:50 cg Exp $' ! ! Filename initialize!