Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
superdirt
Posts: 541
Registered: ‎05-17-2009
My Device: Not Specified

Best practices for basic file IO

I have an application written in C and I need to write functions that will load and save basic settings information. I am looking for persistent store, serialization or something similar. I can do the raw file IO but I think it's silly to take that path considering the settings will likely amount to under 1kb in size on the disk.

 

I found a reference to the "pps" command in the Momentics help but there is little information on this command and I am interested in using it. It appears to be a shell command.

 

Before I dive in, I'd like to hear some suggestions on best practices.

 

Thanks,

Scott

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Best practices for basic file IO

XML always works well for setting like stuff.
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Best practices for basic file IO

[ Edited ]

The PPS stuff you're seeing likely stands for Persistent Publish Subscribe.  It's possible that's a feature that would be useful to you, and there is support in the NDK for working with PPS objects (which act like files in the filesystem, but are more like the "proc" virtual filesystem as the objects have extra behaviour associated with them).

 

A long time ago I wrote a post that has a couple of links that should guide you into it.

 

Edit: I meant to note, however, that it's as yet unclear to what extent we can use the PPS stuff for our own apps. It's clear from several signs that they either intend apps to have access, for their own purposes, or that they at least considered doing it at one point, but I don't think I've seen anything documented about that yet.  Anyone heard of or found actual support for apps to create/use their own PPS objects yet?


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.