IO Error 5. Access is denied

Trying to Remote debug to a NEW REAL PC with Windows 10 from a Mac.
The following code: (Note: previously test with VM + Win7 and Win10 without this error.)

dim fl,f as FolderItem

fl = SpecialFolder.ApplicationData.child(mAppIdentifier)
if fl = nil then
end if
if fl.exists <> true then
end if

#if DebugBuild then
  f = fl.child( ktest + mPathName)
  f = fl.child(mPathName)
dim tos as TextOutputStream

tos = TextOutputStream.create(f)[/code]

is getting an IOException with a Error Code 5 on the last line.

As mention above this a new PC and I have done very little set up.

Help would be appreciated.


if fl.exists <> true then return end if


if not fl.exists then fl.CreateAsFolder end if

Thanks Axel.

It’s working ok now.