06-22-2011 12:16 PM
This was mentioned in the release notes or Elena's post (forget which). The SDK 1.1.0 release adds a feature that lets you easily retrieve a file from or send one to the PlayBook if you have a devMode app installed.
Here's the basic syntax:
blackberry-deploy -getFile REMOTE_PATH LOCAL_NAME -device PBIP -password PBPASS -package MYAPP.bar
The REMOTE_PATH part is effectively relative to File.userDirectory for your app. See the File System Layout article for more on that. This means that to get data from your applicationStorageDirectory area, i.e. the app's "own" data, you'd want to use something like "data/mydatabase.db" (for example for a SQLite database you created with the flash.data package).
LOCAL_NAME is just what you want the file to be named when it's transferred to your development PC. It would be written into the current directory if you don't specify a full path.
PBIP and PBPASS are the usual you use for any blackberry-deploy command, and you can either specify the -package (a .bar file) directly as above (in which case the package name and id are pulled out of it), or a -package-name and -package-id combination, again as bb-deploy has always supported.
To transfer a file to the PlayBook you use "-putFile" instead, and specify the local file first, then the target path on the PlayBook.
Details of usage are shown if you just type "blackberry-deploy" with no arguments.
There's also a -printExitCode option which may be of (limited?) use for those who have an app crash and who don't know how or can't use the debugging tools so they can see tracebacks or trace() output.