« Flash MX 2004 - MenuBar example Speaking at MXDU 2004 »

October 19, 2003

SharpFlash File System Support

Normally I don't post my updates to SharpFlash on my weblog, but I hit a pretty big milestone this weekend. I finished up support for accessing the local file system in projectors created with SharpFlash. This means that SharpFlash can finally start being used to build "useful" applications.

Here is a list of the methods available in the sfFile class.

sfFile.copy(from, to, overwrite, callback, scope);
sfFile.deleteFile(path, callback, scope);
sfFile.exists(path, callback, scope);
sfFile.move(from, to, callback, scope);
// the above is the rename function as well

sfFile.loadObject(file, callback, scope);
sfFile.saveObject(file, obj, callback, scope);
sfFile.loadText(file, callback, scope);
sfFile.saveText(file, text, append, callback, scope);

sfFile.getAttributes(path, callback, scope);
sfFile.setAttributes(path, attributeMask, callback, scope);
sfFile.getCreationTime(path, callback, scope);
sfFile.setCreationTime(path, creationTime, callback, scope);
sfFile.getCreationTimeUtc(path, callback, scope);
sfFile.setCreationTimeUtc(path, creationTime, callback, scope);
sfFile.getLastAccessTime(path, callback, scope);
sfFile.setLastAccessTime(path, accessTime, callback, scope);
sfFile.getLastAccessTimeUtc(path, callback, scope);
sfFile.setLastAccessTimeUtc(path, accessTime, callback, scope);
sfFile.getLastWriteTime(path, callback, scope);
sfFile.setLastWriteTime(path, writeTime, callback, scope);
sfFile.getLastWriteTimeUtc(path, callback, scope);
sfFile.setLastWriteTimeUtc(path, writeTime, callback, scope);

There is still a lot of work that needs to be done, but I'm happy to have something to cross off of the "to-do" list. I hope that I can get this program to where I want it to be, but it's taking me longer than I anticipated. Such is life...

You can download the newest release off of SourceForge. Snag the example files too -- it'll help you get started until I can get the documentation updated.

Comments