Dela via


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 class IStorageFolder : IStorageItem
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(1926351736, 46063, 20341, 168, 11, 111, 217, 218, 226, 148, 75)]
struct IStorageFolder : IStorageItem
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(1926351736, 46063, 20341, 168, 11, 111, 217, 218, 226, 148, 75)]
public interface IStorageFolder : IStorageItem
Public Interface IStorageFolder
Implements IStorageItem
Derived
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)
App capabilities
documentsLibrary musicLibrary picturesLibrary videosLibrary

Properties

Attributes

Gets the attributes of a storage item.

(Inherited from IStorageItem)
DateCreated

Gets the date and time when the current item was created.

(Inherited from IStorageItem)
Name

Gets the name of the item including the file name extension if there is one.

(Inherited from IStorageItem)
Path

Gets the full file-system path of the item, if the item has a path.

(Inherited from IStorageItem)

Methods

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.

CreateFileAsync(String)

Creates a new file in the current folder.

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.

CreateFolderAsync(String)

Creates a new folder in the current folder.

DeleteAsync()

Deletes the current item.

(Inherited from IStorageItem)
DeleteAsync(StorageDeleteOption)

Deletes the current item, optionally deleting it permanently.

(Inherited from IStorageItem)
GetBasicPropertiesAsync()

Gets the basic properties of the current item (like a file or folder).

(Inherited from IStorageItem)
GetFileAsync(String)

Gets the specified file from the current folder.

GetFilesAsync()

Gets the files from the current folder.

GetFolderAsync(String)

Gets the specified folder from the current folder.

GetFoldersAsync()

Gets the folders in the current folder.

GetItemAsync(String)

Gets the specified item from the IStorageFolder.

GetItemsAsync()

Gets the items from the current folder.

IsOfType(StorageItemTypes)

Determines whether the current IStorageItem matches the specified StorageItemTypes value.

(Inherited from IStorageItem)
RenameAsync(String, NameCollisionOption)

Renames the current item. This method also specifies what to do if an existing item in the current item's location has the same name.

(Inherited from IStorageItem)
RenameAsync(String)

Renames the current item.

(Inherited from IStorageItem)

Applies to

See also