AvailableSpace Property |
Description
Returns the amount of space available to a user on the specified drive or network share.
PowerBASIC Syntax
Return Value
VARIANT. The amount of available space.
Remarks
The value returned by the AvailableSpace property is typically the same as that returned by the FreeSpace property. Differences may occur between the two for computer systems that support quotas.
Example [PowerBASIC]
#INCLUDE "windows.inc" #INCLUDE "scrrun.inc"
DIM fso AS IFileSystem DIM pDrive AS IDrive
' Create an instance of the FileSystemObject fso = NEWCOM "Scripting.FileSystemObject" ' Get a reference to the IDrive interface pDrive = fso.GetDrive(UCODE$("C:")) ' Get and display the available space STDOUT "Available space: " & FORMAT$(pDrive.AvailableSpace \ 1024) & " KBytes"
|