SocketTools .NET Edition

WebStorage.Exists Method 

Determine if a stored object exists in the container.

[Visual Basic]
Public Function Exists( _
   ByVal labelName As String _
) As Boolean
[C#]
public bool Exists(
   string labelName
);

Parameters

labelName
A string which specifies the label of the object.

Return Value

This method returns a boolean value. If an object exists in the current container with the specified label, it will return true, other, otherwise it will return false.

Remarks

The Exists method is used to check for the existence of a stored object in the current container. If the object exists, various properties that return information about the current object, such as ObjectId and ObjectSize will be updated to return the metadata associated with the object.

Although storage object labels are similar to Windows file names, they are case-sensitive. When requesting information about an object, your application must specify the label name exactly as it was created. The object label cannot contain wildcard characters.

To obtain information about how much storage your applications are using and the total number of stored objects, use the StorageUsed and StorageObjects properties.

If you wish to enumerate all of the stored objects within the container, use the FindFirst and FindNext methods.

See Also