I know that it’s been asked and answered in various posts, but I’m running into an oddity with TextOutputStream.Append.
In my code, I depended on .Append to create the file requested if it didn’t exist and then append data to that empty file. This has worked fine until today when I tried running an old project on Windows 10 in 2018r1.1. I verified that I have permissions to write to the folder, but I’m getting an error when I try to “tos.WriteLine theString” after the call to Append.
The code looks like this:
Dim f As FolderItem
Dim tos As TextOutputStream
f = SpecialFolder.Temporary.Child(safetmpfile)
If f <> Nil Then
tos = TextOutputStream.Append(f)
If tos <> Nil Then
tos.WriteLine theString
tos.flush
tos.close
End If
End If
Am I wrong that .Append would create the file if it did not exist in prior versions of Xojo?