StorageFile.GetBasicPropertiesAsync Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the basic properties of the current file.
public:
virtual IAsyncOperation<BasicProperties ^> ^ GetBasicPropertiesAsync() = GetBasicPropertiesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<BasicProperties> GetBasicPropertiesAsync();
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<BasicProperties> GetBasicPropertiesAsync();
function getBasicPropertiesAsync()
Public Function GetBasicPropertiesAsync () As IAsyncOperation(Of BasicProperties)
When this method completes successfully, it returns the basic properties of the current file as a BasicProperties object.
- Attributes
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.
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.
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |