I​Storage​Folder I​Storage​Folder I​Storage​Folder Interface

Definition

Manipulates folders and their contents, and provides information about them.

Important

If you simply want to work with folders in your app, see the StorageFolder class.

public : interface IStorageFolderpublic interface IStorageFolderPublic Interface IStorageFolder
Inheritance
IStorageFolderIStorageFolderIStorageFolder
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)
Capabilities
documentsLibrary musicLibrary videosLibrary picturesLibrary

Inherited Members

Inherited properties

Inherited methods

Methods

CreateFileAsync(String) CreateFileAsync(String) CreateFileAsync(String)

Creates a new file in the current folder.

public : IAsyncOperation<StorageFile> CreateFileAsync(PlatForm::String desiredName)public IAsyncOperation<StorageFile> CreateFileAsync(String desiredName)Public Function CreateFileAsync(desiredName As String) As IAsyncOperation( Of StorageFile )
Parameters
desiredName
PlatForm::String String String

The desired name of the file to create.

Returns
Attributes
See Also

CreateFileAsync(String, CreationCollisionOption) CreateFileAsync(String, CreationCollisionOption) CreateFileAsync(String, CreationCollisionOption)

Creates a new file in the current folder, and specifies what to do if a file with the same name already exists in the current folder.

public : IAsyncOperation<StorageFile> CreateFileAsync(PlatForm::String desiredName, CreationCollisionOption options)public IAsyncOperation<StorageFile> CreateFileAsync(String desiredName, CreationCollisionOption options)Public Function CreateFileAsync(desiredName As String, options As CreationCollisionOption) As IAsyncOperation( Of StorageFile )
Parameters
desiredName
PlatForm::String String String

The desired name of the file to create.

If there is an existing file in the current folder that already has the specified desiredName, the specified CreationCollisionOption determines how Windows responds to the conflict.

options
CreationCollisionOption CreationCollisionOption CreationCollisionOption

The enum value that determines how Windows responds if the desiredName is the same as the name of an existing file in the current folder.

Returns
Attributes
See Also

CreateFolderAsync(String) CreateFolderAsync(String) CreateFolderAsync(String)

Creates a new folder in the current folder.

public : IAsyncOperation<StorageFolder> CreateFolderAsync(PlatForm::String desiredName)public IAsyncOperation<StorageFolder> CreateFolderAsync(String desiredName)Public Function CreateFolderAsync(desiredName As String) As IAsyncOperation( Of StorageFolder )
Parameters
desiredName
PlatForm::String String String

The desired name of the folder to create.

Returns
Attributes
See Also

CreateFolderAsync(String, CreationCollisionOption) CreateFolderAsync(String, CreationCollisionOption) CreateFolderAsync(String, CreationCollisionOption)

Creates a new folder in the current folder, and specifies what to do if a folder with the same name already exists in the current folder.

public : IAsyncOperation<StorageFolder> CreateFolderAsync(PlatForm::String desiredName, CreationCollisionOption options)public IAsyncOperation<StorageFolder> CreateFolderAsync(String desiredName, CreationCollisionOption options)Public Function CreateFolderAsync(desiredName As String, options As CreationCollisionOption) As IAsyncOperation( Of StorageFolder )
Parameters
desiredName
PlatForm::String String String

The desired name of the folder to create.

If there is an existing folder in the current folder that already has the specified desiredName, the specified CreationCollisionOption determines how Windows responds to the conflict.

options
CreationCollisionOption CreationCollisionOption CreationCollisionOption

The enum value that determines how Windows responds if the desiredName is the same as the name of an existing folder in the current folder.

Returns
Attributes
See Also

GetFileAsync(String) GetFileAsync(String) GetFileAsync(String)

Gets the specified file from the current folder.

public : IAsyncOperation<StorageFile> GetFileAsync(PlatForm::String name)public IAsyncOperation<StorageFile> GetFileAsync(String name)Public Function GetFileAsync(name As String) As IAsyncOperation( Of StorageFile )
Parameters
name
PlatForm::String String String

The name (or path relative to the current folder) of the file to retrieve.

Returns

When this method completes successfully, it returns a StorageFile that represents the file.

Attributes

GetFilesAsync() GetFilesAsync() GetFilesAsync()

Gets the files from the current folder.

public : IAsyncOperation<IVectorView<StorageFile>> GetFilesAsync()public IAsyncOperation<IReadOnlyList<StorageFile>> GetFilesAsync()Public Function GetFilesAsync() As IAsyncOperation( Of IReadOnlyListStorageFile )
Returns
IAsyncOperation<IVectorView<StorageFile>> IAsyncOperation<IReadOnlyList<StorageFile>> IAsyncOperation<IReadOnlyList<StorageFile>>

When this method completes successfully, it returns a list of the files (type IVectorView ) in the folder. Each file in the list is represented by a StorageFile object.

Attributes

GetFolderAsync(String) GetFolderAsync(String) GetFolderAsync(String)

Gets the specified folder from the current folder.

public : IAsyncOperation<StorageFolder> GetFolderAsync(PlatForm::String name)public IAsyncOperation<StorageFolder> GetFolderAsync(String name)Public Function GetFolderAsync(name As String) As IAsyncOperation( Of StorageFolder )
Parameters
name
PlatForm::String String String

The name of the child folder to retrieve.

Returns

When this method completes successfully, it returns a StorageFolder that represents the child folder.

Attributes

GetFoldersAsync() GetFoldersAsync() GetFoldersAsync()

Gets the folders in the current folder.

public : IAsyncOperation<IVectorView<StorageFolder>> GetFoldersAsync()public IAsyncOperation<IReadOnlyList<StorageFolder>> GetFoldersAsync()Public Function GetFoldersAsync() As IAsyncOperation( Of IReadOnlyListStorageFolder )
Returns
IAsyncOperation<IVectorView<StorageFolder>> IAsyncOperation<IReadOnlyList<StorageFolder>> IAsyncOperation<IReadOnlyList<StorageFolder>>

When this method completes successfully, it returns a list of the files (type IVectorView ). Each folder in the list is represented by a StorageFolder.

Attributes

GetItemAsync(String) GetItemAsync(String) GetItemAsync(String)

Gets the specified item from the IStorageFolder.

public : IAsyncOperation<IStorageItem> GetItemAsync(PlatForm::String name)public IAsyncOperation<IStorageItem> GetItemAsync(String name)Public Function GetItemAsync(name As String) As IAsyncOperation( Of IStorageItem )
Parameters
name
PlatForm::String String String

The name of the item to retrieve.

Returns

When this method completes successfully, it returns the file or folder (type IStorageItem ).

Attributes

GetItemsAsync() GetItemsAsync() GetItemsAsync()

Gets the items from the current folder.

public : IAsyncOperation<IVectorView<IStorageItem>> GetItemsAsync()public IAsyncOperation<IReadOnlyList<IStorageItem>> GetItemsAsync()Public Function GetItemsAsync() As IAsyncOperation( Of IReadOnlyListIStorageItem )
Returns
IAsyncOperation<IVectorView<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>> IAsyncOperation<IReadOnlyList<IStorageItem>>

When this method completes successfully, it returns a list of the files and folders (type IVectorView ). The files and folders in the list are represented by objects of type IStorageItem.

Attributes

See Also