File System Control from nsbasic/ce to nsb/appstudio

File System Control from nsbasic/ce to nsb/appstudio.
I need to use commands “Tech Note 09: File System Control” of nsbasic/ce
in nsb/appstudio.
commands in nsbasic/ce:
AddObject “newObjects.utilctls.SFMain”, “FS”
CreateFile: Creates file in the file system and returns a SFStream object for it
OpenFile: Opens a file from the file system and returns a SFStream object for it
FileExists:Checks if the file exists
etc etc…

These commands allow you to transfer files from pc to device or from device
to pc

How can i do ?

What devices are you planning to run on?

Devices using Android and iOS do not have Windows style file systems. While it’s of course possible to save data on the devices, files like you are used to may not be the best way to do so.

For storage of simple data, localStorage works well:
https://wiki.appstudio.dev/LocalStorage

If you need a database, SQLite can be used:
https://wiki.appstudio.dev/SQLite_made_Simple

It’s also important to consider how the data will be shared with the server. If you want to move data back and forth with a server, Ajax is useful:
https://wiki.appstudio.dev/Ajax_made_Simple

If you need conventional files on an iOS or Android device, use cordova-plugin-file with a native app:

You’ll need to explain more about what you need to do to understand which approach will work best.

1 Like