C# Класс InTheHand.Storage.StorageFolder

Manages folders and their contents and provides information about them.
PlatformVersion supported AndroidAndroid 4.4 and later iOSiOS 9.0 and later tvOStvOS 9.0 and later TizenTizen 3.0 Windows UWPWindows 10 Windows StoreWindows 8.1 or later Windows Phone StoreWindows Phone 8.1 or later Windows Phone SilverlightWindows Phone 8.0 or later Windows (Desktop Apps)Windows Vista or later
Наследование: IStorageFolder, IStorageFolder2, IStorageItem, IStorageItem2
Показать файл Открыть проект

Открытые методы

Метод Описание
CreateFileAsync ( string desiredName ) : Task

Creates a new file with the specified name in the current folder.

CreateFileAsync ( string desiredName, CreationCollisionOption options ) : Task

Creates a new file with the specified name in the current folder.

CreateFolderAsync ( string desiredName ) : Task

Creates a new subfolder with the specified name in the current folder.

CreateFolderAsync ( string desiredName, CreationCollisionOption options ) : Task

Creates a new subfolder with the specified name in the current folder. This method also specifies what to do if a subfolder with the same name already exists in the current folder.

DeleteAsync ( ) : System.Threading.Tasks.Task

Deletes the current folder.

DeleteAsync ( StorageDeleteOption option ) : System.Threading.Tasks.Task

Deletes the current folder. This method also specifies whether to delete the folder permanently.

GetBasicPropertiesAsync ( ) : Task

Gets the basic properties of the current folder.

GetFileAsync ( string filename ) : Task

Gets the file with the specified name from the current folder.

GetFilesAsync ( ) : Task>

Gets the files in the current folder.

GetFolderAsync ( string name ) : Task

Gets the specified folder from the current folder.

GetFolderFromPathAsync ( string path ) : Task

Gets a StorageFile object to represent the file at the specified path.

GetFoldersAsync ( ) : Task>

Gets the folders in the current folder.

GetItemsAsync ( ) : Task>

Gets the items in the current folder.

GetParentAsync ( ) : Task

Gets the parent folder of the current folder.

IsEqual ( IStorageItem item ) : bool

Indicates whether the current folder is equal to the specified folder.

IsOfType ( StorageItemTypes type ) : bool

Indicates whether the current StorageFolder matches the specified StorageItemTypes value.

TryGetItemAsync ( string name ) : Task

Tries to get the file or folder with the specified name from the current folder. Returns null instead of raising a FileNotFoundException if the specified file or folder is not found.

Приватные методы

Метод Описание
StorageFolder ( Windows folder ) : System
StorageFolder ( string path ) : System

Описание методов

CreateFileAsync() публичный Метод

Creates a new file with the specified name in the current folder.
public CreateFileAsync ( string desiredName ) : Task
desiredName string The name of the new file to create in the current folder.
Результат Task

CreateFileAsync() публичный Метод

Creates a new file with the specified name in the current folder.
public CreateFileAsync ( string desiredName, CreationCollisionOption options ) : Task
desiredName string The name of the new file to create in the current folder.
options CreationCollisionOption One of the enumeration values that determines how to handle the collision if a file with the specified desiredName already exists in the current folder.
Результат Task

CreateFolderAsync() публичный Метод

Creates a new subfolder with the specified name in the current folder.
public CreateFolderAsync ( string desiredName ) : Task
desiredName string The name of the new subfolder to create in the current folder.
Результат Task

CreateFolderAsync() публичный Метод

Creates a new subfolder with the specified name in the current folder. This method also specifies what to do if a subfolder with the same name already exists in the current folder.
public CreateFolderAsync ( string desiredName, CreationCollisionOption options ) : Task
desiredName string The name of the new subfolder to create in the current folder.
options CreationCollisionOption One of the enumeration values that determines how to handle the collision if a subfolder with the specified desiredName already exists in the current folder.
Результат Task

DeleteAsync() публичный Метод

Deletes the current folder.
public DeleteAsync ( ) : System.Threading.Tasks.Task
Результат System.Threading.Tasks.Task

DeleteAsync() публичный Метод

Deletes the current folder. This method also specifies whether to delete the folder permanently.
public DeleteAsync ( StorageDeleteOption option ) : System.Threading.Tasks.Task
option StorageDeleteOption
Результат System.Threading.Tasks.Task

GetBasicPropertiesAsync() публичный Метод

Gets the basic properties of the current folder.
public GetBasicPropertiesAsync ( ) : Task
Результат Task

GetFileAsync() публичный Метод

Gets the file with the specified name from the current folder.
public GetFileAsync ( string filename ) : Task
filename string
Результат Task

GetFilesAsync() публичный Метод

Gets the files in the current folder.
public GetFilesAsync ( ) : Task>
Результат Task>

GetFolderAsync() публичный Метод

Gets the specified folder from the current folder.
public GetFolderAsync ( string name ) : Task
name string The name of the child folder to retrieve.
Результат Task

GetFolderFromPathAsync() публичный статический Метод

Gets a StorageFile object to represent the file at the specified path.
public static GetFolderFromPathAsync ( string path ) : Task
path string The path of the file to get a StorageFile to represent. /// If your path uses slashes, make sure you use backslashes(\). /// Forward slashes(/) are not accepted by this method.
Результат Task

GetFoldersAsync() публичный Метод

Gets the folders in the current folder.
public GetFoldersAsync ( ) : Task>
Результат Task>

GetItemsAsync() публичный Метод

Gets the items in the current folder.
public GetItemsAsync ( ) : Task>
Результат Task>

GetParentAsync() публичный Метод

Gets the parent folder of the current folder.
public GetParentAsync ( ) : Task
Результат Task

IsEqual() публичный Метод

Indicates whether the current folder is equal to the specified folder.
public IsEqual ( IStorageItem item ) : bool
item IStorageItem The object that represents the folder to compare against.
Результат bool

IsOfType() публичный Метод

Indicates whether the current StorageFolder matches the specified StorageItemTypes value.
public IsOfType ( StorageItemTypes type ) : bool
type StorageItemTypes The enum value that determines the object type to match against.
Результат bool

TryGetItemAsync() публичный Метод

Tries to get the file or folder with the specified name from the current folder. Returns null instead of raising a FileNotFoundException if the specified file or folder is not found.
public TryGetItemAsync ( string name ) : Task
name string The name (or path relative to the current folder) of the file or folder to get.
Результат Task