Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3967

Folderitem does not exist. What am I missing?

$
0
0

Hello all. I have not had to create folderitems until now, so I am definitely missing experience with this. I have a small piece of method that creates one. The folderitem is created (not nil) but the test for folderitem.exists fails. What am I missing?

Var F as folderitem
Var fdest as string = App.ExecutableFile.Parent.NativePath + "UploadedDocuments\"  + FN
F = New folderitem (FDest, FolderItem.PathModes.Native)

If F <> Nil and F.exists Then   
  t = TextOutputStream.Open(F)
  t.Write(outputstr)
  t.Close
End If

Here, FN is equal to “test.pdf”. The folderitem is not nil, I can seee all its properties in the debug pane. If I only test for F<> Nil, I get an IOException 3 (“path not found” on Windows). If I test as shown, I just skip the writing part. What am I missing that causes F to not exist?

This is being developed on Windows 11, 2024 R3.

Thanks in advance for your help!

22 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3967

Trending Articles