Carbon


URLGetDataAvailable

Header: URLAccess.h Carbon status: Supported

Determines the amount of data currently available for retrieval in a download operation.

OSStatus URLGetDataAvailable (
    URLReference urlRef, 
    Size *dataSize
);
Parameter descriptions
urlRef

A reference to the URL for which you wish to determine the amount od data currently available for retrieval in a download operation.

dataSize

On return, a pointer to the size (in bytes) of data available for retrieval in a download operation.

function result

A result code.

DISCUSSION

The URLGetDataAvailable function determines the amount of data remaining in the buffer of the URL Access Manager that you will obtain from a call to the function URLGetBuffer. You should only call this function if you passed an invalid destination file to the function URLOpen. This does not include the number of bytes in transit to your buffer, nor does it include the amount of data not yet transferred from the URL Access Manager. To calculate the amount of data remaining to be downloaded, pass the name constant kURLResourceSize in the property parameter of the function URLGetProperty and subtract the amount of data copied.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)