Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的剧本应用程序下载一个 zip 文件并打开它。
所以我们可以在剧本上为文件 i/o 操作创建空气对象,因为我猜剧本的 api 还没有开发出来。例如:
var file =new air.File(path);
首先,本文档将帮助您了解 Playbook 文件系统的布局,以及作为开发人员的您可以使用哪些目录:
http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/BlackBerry-PlayBook-File-System-Layout/ta-p/773327
之后,使用文件可以很简单:
var fs:FileStream = new FileStream(); var f:File = File.applicationDirectory; f = f.resolvePath("myfile.txt"); fs.open(f, FileMode.READ); // work with the file contents here fs.close();