On 03/21/2017 04:27 AM, Philip Hazelden wrote:
$PathAndName.IO.f or $PathAndName.IO.open(:w).close;

Note, the following sequence is possible:
1. .IO.f returns false
2. Someone creates the file and writes some data to it
3. .IO.open truncates the file

Thus, this has a chance of editing the file.

I suggest instead (untested):
    $PathAndName.IO.open(:a).close
:a (append) will create the file if it doesn't exist, but will not
truncate it if it does. There's no need to check first whether the file
exists.

Thank you!  You guys are spoiling me!

Reply via email to