Flex 3: Detecting hard disk space
17-08-2009
Flex does not appear to have a library that deals very well running out of disk space, and this was a key part of the recent work I did on a download manager.
When downloading files using the URLStream method and saving to disk with a fileStream, if you run out of space, either on your main hard disk or perhaps a USB flash drive you will get a runtime IO error, #3003.
This is handled easily enough with an event listener…
stream.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
But also ensure this is followed up with a check for the error code, since the same ioError will be fired if network connection goes down unexpectedly.

Self Portrait Collage
Release Animals
100 Mile Journey
Boni from Trap Door Costume
Monster Cake!
Sinclair ZX Spectrum +2 Costume
Video Project for Rimmer’s Wedding
Vodafone Micro SIM iPhone 4 Confusion
Integrating AIR Application with iTunes
Custom Flex WordPress Frontend




Comments/Trackbacks