I know how to get the filesize of a file, but couldn't figure out how to get the filesize of a dir.. anyone?

and second..
Is it possible to stop all active tasks your program is doing (finding files in directories) when pressing a cancel button? (i know this one sounds stupid)

Thanks in advance..