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.












Comments/Trackbacks