File Cake an Adobe AIR project by Jason Williamson. File Cake the program was created to share text files, or code files. File sharing applications like Google documents accomplish this task but with a few extra steps to complete. File Cake an application which runs on the desktop is simplified, you just drag and drop your text files onto the application and automatically they’re readily accessible for everyone. To download files from File Cake just choose a file in the cake by clicking on it and save it.

To accomplish this I used the following AIR packages..

NativeDragEvent listeners took care of the files being dragged onto the application looking to be shared. In the Native_Drag_Enter I stored ClipboardFormats.FILE_LIST_FORMAT as an array which can then be checked for the correct file extension. If it passes then File Cake accepts the drop of the file. To extract the files text data I used the Falcon class. It basically eliminates a dozen classes which have to be used to load and store the data within Flash. Find more info about Falcon and how it works at http://falconflash.wordpress.com/. The name of the file and it’s text are stored into a database by passing variables that hold the info using Falcon again, but this time Falcon sends the variables to php and php inserts them into the database. These variable are now too added to the grid of File Cake. Finally saving the files to your computer is made possible by FileMode.WRITE and writeUTFBytes of the text. To a file you decide the name and location in a save window..