Windows Dev Center

Expand Minimize

StorageFile.GetBasicPropertiesAsync | getBasicPropertiesAsync method

Gets the basic properties of the current file.

Syntax


storageFile.getBasicPropertiesAsync().done( /* Your success and error handlers */ );

Parameters

This method has no parameters.

Return value

Type: IAsyncOperation<BasicProperties>

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.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

See also

StorageFile

 

 

Show:
© 2015 Microsoft