FileInformationFactory FileInformationFactory FileInformationFactory FileInformationFactory Class

Definition

Used to load information about files and folders from the results of a query and to bind these file system items to JavaScript ListView or XAML ListView and GridView controls. After information is loaded, an app can then access that information quickly using synchronous operations.

public : sealed class FileInformationFactory : IFileInformationFactorypublic sealed class FileInformationFactory : IFileInformationFactoryPublic NotInheritable Class FileInformationFactory Implements IFileInformationFactory// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Constructors

FileInformationFactory(IStorageQueryResultBase, ThumbnailMode) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode)

Creates a new FileInformationFactory object that retrieves information about the StorageFile and StorageFolder objects in the specified query result.

public : FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode)public FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode)Public Sub New(queryResult As IStorageQueryResultBase, mode As ThumbnailMode)// You can use this method in JavaScript.
Parameters
queryResult
IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase

The result of a query of files and folders on the system.

To learn about query result objects, see StorageFileQueryResult, StorageFolderQueryResult, and StorageItemQueryResult.

mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

A value that indicates the type of thumbnail view to retrieve for the StorageFile and StorageFolder.

Remarks

If the query specified SetThumbnailPrefetch options, those options are overridden by options requested in any of the FileInformationFactory constructors.

See Also

FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32)

Creates a new FileInformationFactory object that retrieves information about the StorageFile and StorageFolder objects in the specified query result and that specifies the requested size for thumbnails that are retrieved for the objects.

public : FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, unsigned int requestedThumbnailSize)public FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, UInt32 requestedThumbnailSize)Public Sub New(queryResult As IStorageQueryResultBase, mode As ThumbnailMode, requestedThumbnailSize As UInt32)// You can use this method in JavaScript.
Parameters
queryResult
IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase

The result of a query of files and folders on the system.

To learn about query result objects, see StorageFileQueryResult, StorageFolderQueryResult, and StorageItemQueryResult.

mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

A value that indicates the type of thumbnail view to retrieve for the StorageFile and StorageFolder.

requestedThumbnailSize
unsigned int UInt32 UInt32 UInt32

The requested minimum size, in pixels, of the StorageFile and StorageFolder thumbnails.

If thumbnails are not required for IStorageItemInformation objects, set the requestedSize to 0.

See Also

FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions)

Creates a new FileInformationFactory object that retrieves information about the StorageFile and StorageFolder objects in the specified query result, and that specifies the requested size and options for thumbnails that are retrieved for the objects.

public : FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, unsigned int requestedThumbnailSize, ThumbnailOptions thumbnailOptions)public FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, UInt32 requestedThumbnailSize, ThumbnailOptions thumbnailOptions)Public Sub New(queryResult As IStorageQueryResultBase, mode As ThumbnailMode, requestedThumbnailSize As UInt32, thumbnailOptions As ThumbnailOptions)// You can use this method in JavaScript.
Parameters
queryResult
IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase

The result of a query of files and folders on the system.

To learn about query result objects, see StorageFileQueryResult, StorageFolderQueryResult, and StorageItemQueryResult.

mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

A value that indicates the type of thumbnail view to retrieve for the StorageFile and StorageFolder.

requestedThumbnailSize
unsigned int UInt32 UInt32 UInt32

The requested minimum size, in pixels, of the StorageFile and StorageFolder thumbnails.

If thumbnails are not required for IStorageItemInformation objects, set the requestedSize to 0.

thumbnailOptions
ThumbnailOptions ThumbnailOptions ThumbnailOptions ThumbnailOptions

The thumbnail retrieval options.

If you're using FileInformationFactory with the JavaScript ListView or XAML ListView and GridView controls, don't specify ThumbnailOptions.ReturnOnlyIfCached because this mode may prevent the control from being correctly populated with thumbnails.

See Also

FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions, Boolean) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions, Boolean) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions, Boolean) FileInformationFactory(IStorageQueryResultBase, ThumbnailMode, UInt32, ThumbnailOptions, Boolean)

Creates a new FileInformationFactory object that retrieves information about the StorageFile and StorageFolder objects in the specified query result, specifies the requested size and options for thumbnails that are retrieved for the objects, and indicates whether to delay loading information.

public : FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, unsigned int requestedThumbnailSize, ThumbnailOptions thumbnailOptions, bool delayLoad)public FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, UInt32 requestedThumbnailSize, ThumbnailOptions thumbnailOptions, Boolean delayLoad)Public Sub New(queryResult As IStorageQueryResultBase, mode As ThumbnailMode, requestedThumbnailSize As UInt32, thumbnailOptions As ThumbnailOptions, delayLoad As Boolean)// You can use this method in JavaScript.
Parameters
queryResult
IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase IStorageQueryResultBase

The result of a query of files and folders on the system.

To learn about query result objects, see StorageFileQueryResult, StorageFolderQueryResult, and StorageItemQueryResult.

mode
ThumbnailMode ThumbnailMode ThumbnailMode ThumbnailMode

A value that indicates the type of thumbnail view to retrieve for the StorageFile and StorageFolder.

requestedThumbnailSize
unsigned int UInt32 UInt32 UInt32

The requested minimum size, in pixels, of the StorageFile and StorageFolder thumbnails.

If thumbnails are not required for IStorageItemInformation objects, set the requestedSize to 0.

thumbnailOptions
ThumbnailOptions ThumbnailOptions ThumbnailOptions ThumbnailOptions

The thumbnail retrieval options.

If you're using FileInformationFactory with the JavaScript ListView or XAML ListView and GridView controls, don't specify ThumbnailOptions.ReturnOnlyIfCached because this mode may prevent the control from being correctly populated with thumbnails.

delayLoad
bool Boolean Boolean Boolean

True to delay loading information; otherwise false. By default, this option is false and delay loading is not used.

If delayLoad is true, it authorizes the FileInformationFactory to return IStorageItemInformation objects before thumbnails are available. Subsequently, the system fires a ThumbnailUpdated event when thumbnails become available. Using delay loading is recommended because it makes apps seem more responsive.

If delayLoad is false (as it is by default), the system will require more time to retrieve IStorageItemInformation objects, but after the objects are retrieved all cached thumbnails will be accessible synchronously. Thumbnails that are not cached must still be accessed asynchronously in response to the ThumbnailUpdated event.

See Also

Methods

GetFilesAsync() GetFilesAsync() GetFilesAsync() GetFilesAsync()

Retrieves a collection of FileInformation objects that contain information about all StorageFile objects in a collection.

public : IAsyncOperation<IVectorView<FileInformation>> GetFilesAsync()public IAsyncOperation<IReadOnlyList<FileInformation>> GetFilesAsync()Public Function GetFilesAsync() As IAsyncOperation( Of IReadOnlyListFileInformation )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<FileInformation>> IAsyncOperation<IReadOnlyList<FileInformation>> IAsyncOperation<IReadOnlyList<FileInformation>> IAsyncOperation<IReadOnlyList<FileInformation>>

When this method completes successfully, it returns the list (type IVectorView ) of FileInformation objects.

See Also

GetFilesAsync(UInt32, UInt32) GetFilesAsync(UInt32, UInt32) GetFilesAsync(UInt32, UInt32) GetFilesAsync(UInt32, UInt32)

Retrieves a collection of FileInformation objects that contain information about a range of StorageFile objects in a collection.

public : IAsyncOperation<IVectorView<FileInformation>> GetFilesAsync(unsigned int startIndex, unsigned int maxItemsToRetrieve)public IAsyncOperation<IReadOnlyList<FileInformation>> GetFilesAsync(UInt32 startIndex, UInt32 maxItemsToRetrieve)Public Function GetFilesAsync(startIndex As UInt32, maxItemsToRetrieve As UInt32) As IAsyncOperation( Of IReadOnlyListFileInformation )// You can use this method in JavaScript.
Parameters
startIndex
unsigned int UInt32 UInt32 UInt32

The zero-based index of the first StorageFile in the range.

maxItemsToRetrieve
unsigned int UInt32 UInt32 UInt32

The maximum number of StorageFile objects to retrieve information for.

Returns
IAsyncOperation<IVectorView<FileInformation>> IAsyncOperation<IReadOnlyList<FileInformation>> IAsyncOperation<IReadOnlyList<FileInformation>> IAsyncOperation<IReadOnlyList<FileInformation>>

When this method completes successfully, it returns the list (type IVectorView ) of FileInformation objects.

See Also

GetFoldersAsync() GetFoldersAsync() GetFoldersAsync() GetFoldersAsync()

Retrieves a collection of FolderInformation objects that contain information about all StorageFolder objects in a collection.

public : IAsyncOperation<IVectorView<FolderInformation>> GetFoldersAsync()public IAsyncOperation<IReadOnlyList<FolderInformation>> GetFoldersAsync()Public Function GetFoldersAsync() As IAsyncOperation( Of IReadOnlyListFolderInformation )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<FolderInformation>> IAsyncOperation<IReadOnlyList<FolderInformation>> IAsyncOperation<IReadOnlyList<FolderInformation>> IAsyncOperation<IReadOnlyList<FolderInformation>>

When this method completes successfully, it returns the list (type IVectorView ) of FolderInformation objects.

See Also

GetFoldersAsync(UInt32, UInt32) GetFoldersAsync(UInt32, UInt32) GetFoldersAsync(UInt32, UInt32) GetFoldersAsync(UInt32, UInt32)

Retrieves a collection of FolderInformation objects that contain information about a range of StorageFolder objects in a collection.

public : IAsyncOperation<IVectorView<FolderInformation>> GetFoldersAsync(unsigned int startIndex, unsigned int maxItemsToRetrieve)public IAsyncOperation<IReadOnlyList<FolderInformation>> GetFoldersAsync(UInt32 startIndex, UInt32 maxItemsToRetrieve)Public Function GetFoldersAsync(startIndex As UInt32, maxItemsToRetrieve As UInt32) As IAsyncOperation( Of IReadOnlyListFolderInformation )// You can use this method in JavaScript.
Parameters
startIndex
unsigned int UInt32 UInt32 UInt32

The zero-based index of the first StorageFolder in the range.

maxItemsToRetrieve
unsigned int UInt32 UInt32 UInt32

The maximum number of StorageFolder objects to retrieve information for.

Returns
IAsyncOperation<IVectorView<FolderInformation>> IAsyncOperation<IReadOnlyList<FolderInformation>> IAsyncOperation<IReadOnlyList<FolderInformation>> IAsyncOperation<IReadOnlyList<FolderInformation>>

When this method completes successfully, it returns the list (type IVectorView ) of FolderInformation objects.

See Also

GetItemsAsync() GetItemsAsync() GetItemsAsync() GetItemsAsync()

Retrieves a collection of IStorageItemInformation objects that contain information about all the items in the collection.

public : IAsyncOperation<IVectorView<IStorageItemInformation>> GetItemsAsync()public IAsyncOperation<IReadOnlyList<IStorageItemInformation>> GetItemsAsync()Public Function GetItemsAsync() As IAsyncOperation( Of IReadOnlyListIStorageItemInformation )// You can use this method in JavaScript.
Returns
IAsyncOperation<IVectorView<IStorageItemInformation>> IAsyncOperation<IReadOnlyList<IStorageItemInformation>> IAsyncOperation<IReadOnlyList<IStorageItemInformation>> IAsyncOperation<IReadOnlyList<IStorageItemInformation>>

When this method completes successfully, it returns the list (type IVectorView ) of FileInformation and FolderInformation objects.

See Also

GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32) GetItemsAsync(UInt32, UInt32)

Retrieves a collection of IStorageItemInformation objects that contain information about a range of items in a collection.

public : IAsyncOperation<IVectorView<IStorageItemInformation>> GetItemsAsync(unsigned int startIndex, unsigned int maxItemsToRetrieve)public IAsyncOperation<IReadOnlyList<IStorageItemInformation>> GetItemsAsync(UInt32 startIndex, UInt32 maxItemsToRetrieve)Public Function GetItemsAsync(startIndex As UInt32, maxItemsToRetrieve As UInt32) As IAsyncOperation( Of IReadOnlyListIStorageItemInformation )// You can use this method in JavaScript.
Parameters
startIndex
unsigned int UInt32 UInt32 UInt32

The zero-based index of the first item in the range.

maxItemsToRetrieve
unsigned int UInt32 UInt32 UInt32

The maximum number of items to retrieve information for.

Returns
IAsyncOperation<IVectorView<IStorageItemInformation>> IAsyncOperation<IReadOnlyList<IStorageItemInformation>> IAsyncOperation<IReadOnlyList<IStorageItemInformation>> IAsyncOperation<IReadOnlyList<IStorageItemInformation>>

When this method completes successfully, it returns the list (type IVectorView ) of FileInformation and FolderInformation objects.

See Also

GetVirtualizedFilesVector() GetVirtualizedFilesVector() GetVirtualizedFilesVector() GetVirtualizedFilesVector()

Gets a virtualized vector of IStorageItemInformation objects that can be bound to ListView or GridView controls in C#, C++, and VB.

public : PlatForm::Object GetVirtualizedFilesVector()public object GetVirtualizedFilesVector()Public Function GetVirtualizedFilesVector() As object// You can use this method in JavaScript.
Returns
PlatForm::Object object object object

The virtualized vector of IStorageItemInformation objects.

Remarks

A virtualized vector can return null for some items before it populates their value.

GetVirtualizedFoldersVector() GetVirtualizedFoldersVector() GetVirtualizedFoldersVector() GetVirtualizedFoldersVector()

Gets a virtualized vector of IStorageItemInformation objects that can be bound to ListView or GridView controls in C#, C++, and VB.

public : PlatForm::Object GetVirtualizedFoldersVector()public object GetVirtualizedFoldersVector()Public Function GetVirtualizedFoldersVector() As object// You can use this method in JavaScript.
Returns
PlatForm::Object object object object

The virtualized vector of IStorageItemInformation objects.

GetVirtualizedItemsVector() GetVirtualizedItemsVector() GetVirtualizedItemsVector() GetVirtualizedItemsVector()

Gets a virtualized vector of IStorageItemInformation objects that can be bound to ListView or GridView controls in C#, C++, and VB.

public : PlatForm::Object GetVirtualizedItemsVector()public object GetVirtualizedItemsVector()Public Function GetVirtualizedItemsVector() As object// You can use this method in JavaScript.
Returns
PlatForm::Object object object object

The virtualized vector of IStorageItemInformation objects.