Something that has been consistently requested for a while now was more file-system related control, that is, more than what the current File I/O API allows you to do. Such as, allowing developers to get the listing of files in a specific directory, create folders (in Documents and Temporary directories), remove directories, and even get the attributes of a specific file—all things that have been impossible to do in Corona.
Impossible until now, that is. I’m happy to announce that coming soon to a daily-build-near-you is the highly-requested LuaFileSystem (LFS) library, which will enable all the things mentioned, as well as a little more.
What this also means is that awesome libraries that depend on LuaFileSystem, such as Penlight is now available for use in Corona projects! Please keep in mind, however, that some functionality of 3rd party Lua libraries may not be present depending on other dependencies, or if they try to do things that are not permitted on your target device.
LuaFileSystem will be available starting in the next daily build (we’re working on getting it posted). Once it’s ready, using it is simply a matter of adding:
local lfs = require "lfs"
…In the Lua source file you plan on using it. From there, take a look at the LFS Reference for a listing of all the functions and syntax (a tutorial will be coming soon!).
While you’re waiting for the build to post, subscribe now so you can get it as soon as it’s available. As a reminder, access to daily builds is a benefit extended to Corona subscribers only.
Speaking of daily builds, we pushed in a number of bug fixes over the past few weeks. Listed below is just a few of the major ones, but you can see a complete listing here.
- Fixed “bad builds” issue due to problems with build.settings (you’ll now get an error).
- Windows: stderr is now logged to the Corona Simulator output console.
- Several Kindle Fire and Nook-specific bug fixes.
- Several Storyboard and Widget bug fixes.
- Added workarounds for OpenAL suspend/resume bugs having to do with multiple OpenAL apps running at once.
- Fixed crashes that occurred when touching masked objects.
- Fixed post-collision mis-reporting bugs.
- Several internal OpenGL-related issues.
- display.newText() bug fixes.
- And more!
Once again, the above list is just a short sample—there’s too many to list! To see a complete listing of all the bug fixes, additions, and other changes, see the daily build summary page.
And if you haven’t already, subscribe now to get the latest build today.