Question about File Access in LR

I am trying to learn how to use the Xojo.IO.FolderItem class and the Language Reference at http://developer.xojo.com/userguide/file-access has me confused.

At the beginning it talks about using constructors if you need to switch back and forth between this and the classic classes. Ok, I don’t want to do that, I just want to use the new class in my project.

So, reading down further on this particular page all of the example code shows things like (Accessing a File from a Specific Location)

Dim f As FolderItem f = GetFolderItem("Schedule")

Is this an example of the classic class or the Xojo.IO.FolderItem class?

Specifcally, I want to copy a database file located in my application’s resources file to the Application Support/myApp/ folder. But I don’t know if I can just use the code on the LR or if it is just leftover classic code that Xojo has not bothered to update.

Also, the same question about the “Copy and Move” Example that comes with 2016r4.1 I think it is using the classic class? If so, where are the examples using the new class?

GetfolderItem is classic.

Everything relevant to Xojo.io.folderItem is at
http://developer.xojo.com/xojo-io-folderitem

In new framework, you must use an absolute path as constructor.

There is no equivalent to f = GetFolderItem("Schedule") . You would have to do something like this using the classic framework to create a new Xojo.io.FolderItem :

Dim f as Xojo.io.FolderItem f = new Xojo.io.folderItem(GetFolderItem("Schedule").nativePath.ToText, True)

Note that using files located next to the executable is not recommended . Better place them in SpecialFolder.ApplicationSupport (new framework).

Maybe you better do that with old framework.
Until new framework is complete you may better use the right one for each job.

The new framework is not complete? What does that mean?

I guess I will stick with the old one then.

@Michel Bujardet Yes, I’ve been guilty of using files next to the executable and am now fixing that. Thought I’d try to learn and use the new framework for that, but maybe it’s not necessary/advisable.

I do find it strange that Xojo would introduce the new framework, but not really given any examples to work with.

New framework was created originally for iOS. Then it was ported to all platforms. As a result, it does not cover a lot of areas.

You may want to stay with Classic for now.