Current directory

dim path As FolderItem= SpecialFolder.Documents
dim  f as   FolderItem= path.Child("prefs.ini")

works fine

but when trying to use SpecialFolder.CurrentWorkingDirectory it errors with “This item does not exist”

The old framework was easy if no path was assigned it used the current directory.

What am i missing?



Works just fine here under Mac OS X El Capitan 10.11.1 and Xojo 2015R3.

It shows it’s path to be “/”.

Forgot to add “Using” in my code sample above.

CurrentWorkingDirectory is not a method of, so it makes sense why I get the error.

So question is: How do I get the current working directory using

BTW the sample Folder item does not work ( "Path must be an absolute path ") and the reason I need the current directory

Dim f As New Xojo.IO.FolderItem(“test.txt”)

If f.Exists Then
// open the file
End If



You don’t.

You may want to file a feature request.

In the meantime, while using, you may want to try

Kind of involved, but it works just fine :

using xojo.IO dim f As New Xojo.IO.FolderItem( global.specialfolder.CurrentWorkingDirectory.NativePath.ToText)