Calculates the size of an open directory