<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Ahh, thanks. I'll try it out when back in front of my machine.</div><div><br></div><div>Thanks,</div><div>Doug<br><br>Sent from my iPhone</div><div><br>On May 31, 2014, at 14:23, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Hi Doug,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 31, 2014 at 10:00 AM, Douglas McPherson <span dir="ltr">&lt;<a href="mailto:djm1329@san.rr.com" target="_blank">djm1329@san.rr.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Is there a way to open a write-only file in Squeak? On both Mac and Linux attempting to open such a file fails.</div>
</blockquote><div><br></div><div>Squeak has forceNewFileNamed: &amp; forceNewFileNamed:do:. &nbsp;If you look at sqFileOpen in&nbsp;platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c you'll see it first attempts to open read-write and if that fails, opens write-only. &nbsp;So it should work.</div>
<div><br></div><div>HTH</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">
<div>For example, if you create a write-only file, i.e. in a shell, after cd to default directory<br></div><div><br></div><div><font face="Courier">echo nada &gt; foo</font></div><div><font face="Courier">chmod 200 foo</font></div>
<div><br></div><div>Then from Squeak</div><div><br></div><div><font face="Courier">StandardFileStream fileNamed: 'foo'</font></div><div><br></div><div>returns nil.</div><div><br></div><div>If the file is given read permission (i.e. <font face="Courier">chmod 600 foo</font>) then Squeak can open it.</div>
<div><br></div><div>Anyone know a workaround?</div><div><br></div><div>Thanks,</div><div>Doug</div></div></blockquote></div><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div></div>
</div></blockquote><blockquote type="cite"><div><span></span><br></div></blockquote></body></html>