<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Yes, but the file is write-only, not read-only :)</div><div><br></div><div>Interestingly, trying <font class="Apple-style-span" face="Courier">FileStream readOnlyFileNamed: 'foo'</font> yields a <font class="Apple-style-span" face="Courier">FileDoesNotExistException</font>, although the file does exist, it just happens to be write-only.</div><div><br></div><div><font class="Apple-style-span" face="Courier">StandardFileStream fileNamed: 'foo'</font> does not raise <font class="Apple-style-span" face="Courier">FileDoesNotExistException</font>, instead fails to open the file and returns nil.&nbsp;</div><div><br></div><div>Doug</div><div><br></div><br><div><div>On May 31, 2014, at 10:46 , David T. Lewis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On Sat, May 31, 2014 at 10:00:06AM -0700, Douglas McPherson wrote:<br><blockquote type="cite">Is there a way to open a write-only file in Squeak? On both Mac and Linux attempting to open such a file fails.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">For example, if you create a write-only file, i.e. in a shell, after cd to default directory<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">echo nada &gt; foo<br></blockquote><blockquote type="cite">chmod 200 foo<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Then from Squeak<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">StandardFileStream fileNamed: 'foo'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">returns nil.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">If the file is given read permission (i.e. chmod 600 foo) then Squeak can open it.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Anyone know a workaround?<br></blockquote><blockquote type="cite"><br></blockquote><br>Sure, you can use FileStream readOnlyFileNamed: 'foo'.<br><br>Dave<br><br></div></blockquote></div><br></body></html>