File​Information​Factory File​Information​Factory File​Information​Factory 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
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)

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)
Parameters
queryResult
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

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

Attributes

Remarks

If the query specified SetThumbnailPrefetch options, those options are overridden by options requested in any of the @Windows.Storage.BulkAccess.FileInformationFactory.#ctor(Windows.Storage.Search.IStorageQueryResultBase,Windows.Storage.FileProperties.ThumbnailMode)?text=FileInformationFactory constructors.

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, UInt32 requestedThumbnailSize)public FileInformationFactory(IStorageQueryResultBase queryResult, ThumbnailMode mode, UInt32 requestedThumbnailSize)Public Sub New(queryResult As IStorageQueryResultBase, mode As ThumbnailMode, requestedThumbnailSize As UInt32)
Parameters
queryResult
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

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

requestedThumbnailSize
System.UInt32 System.UInt32 System.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.

Attributes

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, UInt32 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)
Parameters
queryResult
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

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

requestedThumbnailSize
System.UInt32 System.UInt32 System.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

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.

Attributes

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, UInt32 requestedThumbnailSize, ThumbnailOptions thumbnailOptions, Boolean 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)
Parameters
queryResult
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

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

requestedThumbnailSize
System.UInt32 System.UInt32 System.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

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
System.Boolean System.Boolean System.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.

Attributes

Methods

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<IVectorView<FileInformation>> GetFilesAsync()Public Function GetFilesAsync() As IAsyncOperation( Of IVectorViewFileInformation )
Returns

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

Attributes

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(UInt32 startIndex, UInt32 maxItemsToRetrieve)public IAsyncOperation<IVectorView<FileInformation>> GetFilesAsync(UInt32 startIndex, UInt32 maxItemsToRetrieve)Public Function GetFilesAsync(startIndex As UInt32, maxItemsToRetrieve As UInt32) As IAsyncOperation( Of IVectorViewFileInformation )
Parameters
startIndex
System.UInt32 System.UInt32 System.UInt32

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

maxItemsToRetrieve
System.UInt32 System.UInt32 System.UInt32

The maximum number of StorageFile objects to retrieve information for.

Returns

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

Attributes

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<IVectorView<FolderInformation>> GetFoldersAsync()Public Function GetFoldersAsync() As IAsyncOperation( Of IVectorViewFolderInformation )
Returns

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

Attributes

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(UInt32 startIndex, UInt32 maxItemsToRetrieve)public IAsyncOperation<IVectorView<FolderInformation>> GetFoldersAsync(UInt32 startIndex, UInt32 maxItemsToRetrieve)Public Function GetFoldersAsync(startIndex As UInt32, maxItemsToRetrieve As UInt32) As IAsyncOperation( Of IVectorViewFolderInformation )
Parameters
startIndex
System.UInt32 System.UInt32 System.UInt32

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

maxItemsToRetrieve
System.UInt32 System.UInt32 System.UInt32

The maximum number of StorageFolder objects to retrieve information for.

Returns

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

Attributes

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<IVectorView<IStorageItemInformation>> GetItemsAsync()Public Function GetItemsAsync() As IAsyncOperation( Of IVectorViewIStorageItemInformation )
Returns

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

Attributes

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(UInt32 startIndex, UInt32 maxItemsToRetrieve)public IAsyncOperation<IVectorView<IStorageItemInformation>> GetItemsAsync(UInt32 startIndex, UInt32 maxItemsToRetrieve)Public Function GetItemsAsync(startIndex As UInt32, maxItemsToRetrieve As UInt32) As IAsyncOperation( Of IVectorViewIStorageItemInformation )
Parameters
startIndex
System.UInt32 System.UInt32 System.UInt32

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

maxItemsToRetrieve
System.UInt32 System.UInt32 System.UInt32

The maximum number of items to retrieve information for.

Returns

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

Attributes

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 object GetVirtualizedFilesVector()public object GetVirtualizedFilesVector()Public Function GetVirtualizedFilesVector() As object
Returns
object object object

The virtualized vector of IStorageItemInformation objects.

Attributes

Remarks

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

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 object GetVirtualizedFoldersVector()public object GetVirtualizedFoldersVector()Public Function GetVirtualizedFoldersVector() As object
Returns
object object object

The virtualized vector of IStorageItemInformation objects.

Attributes

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 object GetVirtualizedItemsVector()public object GetVirtualizedItemsVector()Public Function GetVirtualizedItemsVector() As object
Returns
object object object

The virtualized vector of IStorageItemInformation objects.

Attributes