compute file and directory size