Interface IStorageFolder
Manipulates folders and their contents, and provides information about them.
[NotClientImplementable]
public interface IStorageFolder : IStorageItem, IDisposable
- Inherited Members
- Extension Methods
Methods
CreateFileAsync(string)
Creates a file with specified name as a child of the current storage folder
Task<IStorageFile?> CreateFileAsync(string name)
Parameters
name
stringThe display name
Returns
- Task<IStorageFile>
A new IStorageFile pointing to the moved file. If not null, the current storage item becomes invalid
CreateFolderAsync(string)
Creates a folder with specified name as a child of the current storage folder
Task<IStorageFolder?> CreateFolderAsync(string name)
Parameters
name
stringThe display name
Returns
- Task<IStorageFolder>
A new IStorageFolder pointing to the moved file. If not null, the current storage item becomes invalid
GetFileAsync(string)
Gets the file with the specified name from the current folder.
Task<IStorageFile?> GetFileAsync(string name)
Parameters
name
stringThe name of the file to get
Returns
- Task<IStorageFile>
When this method completes successfully, it returns the file with the specified name from the current folder.
GetFolderAsync(string)
Gets the folder with the specified name from the current folder.
Task<IStorageFolder?> GetFolderAsync(string name)
Parameters
name
stringThe name of the folder to get
Returns
- Task<IStorageFolder>
When this method completes successfully, it returns the folder with the specified name from the current folder.
GetItemsAsync()
Gets the files and subfolders in the current folder.
IAsyncEnumerable<IStorageItem> GetItemsAsync()
Returns
- IAsyncEnumerable<IStorageItem>
When this method completes successfully, it returns a list of the files and folders in the current folder. Each item in the list is represented by an IStorageItem implementation object.