The SizeFileComparator class in the ApacheSW Commons IOS library has several Comparator singletons for sorting files according to file size. Files can be sorted in ascending and descending size order. SIZE_COMPARATOR and SIZE_REVERSE treat directory sizes as 0, while SIZE_SUMDIR_COMPARATOR and SIZE_SUMDIR_REVERSE treat directory sizes as the sum of their contents. The SizeFileComparatorTest class demonstrates this.