You can't have a "self-contained test" if you are testing writing to a file. You need to write to the file. The shell commands showed the output of cat. The test showed exactly what the output indicated: If you pass append() an empty string, as shown in the spew() example I was replying to, you will get an error.
Who suggested passing an empty string as in the spew example?
That is the wrong way to try to use path()->append
And the reason to do this in the OP's case is not for file permission preservation, but for file locking.
The rest of the OPs program doesn't use advisory locking, so there is no benefit if Path::Tiny uses it
Therefore there is no benefit to using append at all
In reply to Re^8: Clear the contents of the text file
by Anonymous Monk
in thread Clear the contents of the text file
by shroh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |