IStorageFolder
IStorageFolder
IStorageFolder
IStorageFolder
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// You can use this interface in JavaScript.
- Inheritance
-
IStorageFolderIStorageFolderIStorageFolderIStorageFolder
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
| Capabilities |
musicLibrary
picturesLibrary
videosLibrary
documentsLibrary
|
Inherited Members
Inherited properties
Inherited methods
Methods
CreateFileAsync(String) 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 )// You can use this method in JavaScript.
- desiredName
- PlatForm::String String String String
The desired name of the file to create.
When this method completes, it returns the new file as a StorageFile.
- See Also
CreateFileAsync(String, CreationCollisionOption) 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 )// You can use this method in JavaScript.
- desiredName
- PlatForm::String 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 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.
When this method completes, it returns the new file as a StorageFile.
- See Also
CreateFolderAsync(String) 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 )// You can use this method in JavaScript.
- desiredName
- PlatForm::String String String String
The desired name of the folder to create.
When this method completes, it returns the new folder as a StorageFolder.
- See Also
CreateFolderAsync(String, CreationCollisionOption) 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 )// You can use this method in JavaScript.
- desiredName
- PlatForm::String 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 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.
When this method completes, it returns the new folder as a StorageFolder.
- See Also
GetFileAsync(String) 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 )// You can use this method in JavaScript.
- name
- PlatForm::String String String String
The name (or path relative to the current folder) of the file to retrieve.
When this method completes successfully, it returns a StorageFile that represents the file.
GetFilesAsync() 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 )// You can use this method in JavaScript.
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.
GetFolderAsync(String) 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 )// You can use this method in JavaScript.
- name
- PlatForm::String String String String
The name of the child folder to retrieve.
When this method completes successfully, it returns a StorageFolder that represents the child folder.
GetFoldersAsync() 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 )// You can use this method in JavaScript.
When this method completes successfully, it returns a list of the files (type IVectorView ). Each folder in the list is represented by a StorageFolder.
GetItemAsync(String) 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 )// You can use this method in JavaScript.
- name
- PlatForm::String String String String
The name of the item to retrieve.
When this method completes successfully, it returns the file or folder (type IStorageItem ).
GetItemsAsync() 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 )// You can use this method in JavaScript.
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.