C# Class 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
Inheritance: IStorageFolder, IStorageFolder2, IStorageItem, IStorageItem2
Afficher le fichier Open project: inthehand/Charming

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
StorageFolder ( Windows folder ) : System
StorageFolder ( string path ) : System

Method Details

CreateFileAsync() public méthode

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.
Résultat Task

CreateFileAsync() public méthode

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.
Résultat Task

CreateFolderAsync() public méthode

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.
Résultat Task

CreateFolderAsync() public méthode

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.
Résultat Task

DeleteAsync() public méthode

Deletes the current folder.
public DeleteAsync ( ) : System.Threading.Tasks.Task
Résultat System.Threading.Tasks.Task

DeleteAsync() public méthode

Deletes the current folder. This method also specifies whether to delete the folder permanently.
public DeleteAsync ( StorageDeleteOption option ) : System.Threading.Tasks.Task
option StorageDeleteOption
Résultat System.Threading.Tasks.Task

GetBasicPropertiesAsync() public méthode

Gets the basic properties of the current folder.
public GetBasicPropertiesAsync ( ) : Task
Résultat Task

GetFileAsync() public méthode

Gets the file with the specified name from the current folder.
public GetFileAsync ( string filename ) : Task
filename string
Résultat Task

GetFilesAsync() public méthode

Gets the files in the current folder.
public GetFilesAsync ( ) : Task>
Résultat Task>

GetFolderAsync() public méthode

Gets the specified folder from the current folder.
public GetFolderAsync ( string name ) : Task
name string The name of the child folder to retrieve.
Résultat Task

GetFolderFromPathAsync() public static méthode

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.
Résultat Task

GetFoldersAsync() public méthode

Gets the folders in the current folder.
public GetFoldersAsync ( ) : Task>
Résultat Task>

GetItemsAsync() public méthode

Gets the items in the current folder.
public GetItemsAsync ( ) : Task>
Résultat Task>

GetParentAsync() public méthode

Gets the parent folder of the current folder.
public GetParentAsync ( ) : Task
Résultat Task

IsEqual() public méthode

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.
Résultat bool

IsOfType() public méthode

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.
Résultat bool

TryGetItemAsync() public méthode

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.
Résultat Task