Does anyone know if an API exists for working with the filesystem as far as checking for filesizes and how much space is left?

Thanks.