def check_free_space_in_dir(path, size):
 from ..utils.console import human_file_size
 space = get_free_space_in_dir(path)
 if (space < size):
  raise IOError(u"Not enough free space in '{0}' to download a {1} file".format(path, human_file_size(size)))

def check_free_space_in_dir ( path , size ) : from . . utils . console import human_file_size space = get_free_space_in_dir ( path ) if ( space < size ) : raise IOError ( u"Not enough free space in '{0}' to download a {1} file" . format ( path , human_file_size ( size ) ) )
determines if a given directory has enough space to hold a file of a given size .