StorageFile.GetBasicPropertiesAsync StorageFile.GetBasicPropertiesAsync StorageFile.GetBasicPropertiesAsync StorageFile.GetBasicPropertiesAsync StorageFile.GetBasicPropertiesAsync Method

Definition

Gets the basic properties of the current file.

public : IAsyncOperation<BasicProperties> GetBasicPropertiesAsync()
IAsyncOperation<BasicProperties> GetBasicPropertiesAsync() const;
public IAsyncOperation<BasicProperties> GetBasicPropertiesAsync()
Public Function GetBasicPropertiesAsync() As IAsyncOperation(Of BasicProperties)
Windows.Storage.StorageFile.getBasicPropertiesAsync().done( /* Your success and error handlers */ );
Returns

When this method completes successfully, it returns the basic properties of the current file as a BasicProperties object.

Examples

This example shows you how to access basic properties of a file using the storageFile.getBasicPropertiesAsync method.

storageFile.getBasicPropertiesAsync().then(
    function (basicProperties) {
        var size  = basicProperties.size;
    }
);

You must have a StorageFile object (storageFile in the example) that represents your file in order to use the storageFile.getBasicPropertiesAsync method.

Remarks

This method will return E_ILLEGAL_METHOD_CALL if there are other async operations in progress on the same StorageItem instance. Make sure that another thread isn't modifying the StorageItem at the same time.