Calculates the size of a file / directory. If the file / directory does not exist, 0 is returned. This can hang if there are too many nested directories, so it is recommended to use a WithTimeout wrapper around this method.