Freigeben über


File.FreeSpace Property

Definition

Returns the number of unallocated bytes in the partition named by this abstract path name.

public virtual long FreeSpace { [Android.Runtime.Register("getFreeSpace", "()J", "GetGetFreeSpaceHandler")] get; }
[<get: Android.Runtime.Register("getFreeSpace", "()J", "GetGetFreeSpaceHandler")>]
member this.FreeSpace : int64

Property Value

The number of unallocated bytes on the partition or 0L if the abstract pathname does not name a partition. This value will be less than or equal to the total file system size returned by #getTotalSpace.

Attributes

Remarks

Returns the number of unallocated bytes in the partition named by this abstract path name.

The returned number of unallocated bytes is a hint, but not a guarantee, that it is possible to use most or any of these bytes. The number of unallocated bytes is most likely to be accurate immediately after this call. It is likely to be made inaccurate by any external I/O operations including those made on the system outside of this virtual machine. This method makes no guarantee that write operations to this file system will succeed.

Added in 1.6.

Java documentation for java.io.File.getFreeSpace().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to