Skip to main content
`Ctrl`+`K`

# check_free_space_in_dir

astropy.utils.data.check_free_space_in_dir(path, size)

  Determines if a given directory has enough space to hold a file of a given size.

  Parameters:
    path `python:str`, `os.PathLike`[`python:str`]

      The path to a directory.

    size `python:int` or `Quantity`

      A proposed filesize. If not a Quantity, assume it is in bytes.

  Raises:
    `OSError`

      There is not enough room on the filesystem.