get_free_space_in_dir# astropy.utils.data.get_free_space_in_dir(path, unit=False)[源代码]# 给定一个目录的路径,返回该文件系统上的可用空间量。 参数: path : strPython :字符串目录的路径。 unit : bool 或 Unit布尔值或单位值返回以给定单位表示的可用空间量(如果提供)。默认为 False 向后兼容。 返回: free_space : int 或 QuantityPython:Int或Quantity目录所在分区上的可用空间量。如果 unit=False ,则返回为纯整数(以字节为单位)。