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
Mostra file Open project: inthehand/Charming

Public Methods

Method 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

Method Description
StorageFolder ( Windows folder ) : System
StorageFolder ( string path ) : System

Method Details

CreateFileAsync() public method

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.
return Task

CreateFileAsync() public method

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.
return Task

CreateFolderAsync() public method

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.
return Task

CreateFolderAsync() public method

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.
return Task

DeleteAsync() public method

Deletes the current folder.
public DeleteAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

DeleteAsync() public method

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

GetBasicPropertiesAsync() public method

Gets the basic properties of the current folder.
public GetBasicPropertiesAsync ( ) : Task
return Task

GetFileAsync() public method

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

GetFilesAsync() public method

Gets the files in the current folder.
public GetFilesAsync ( ) : Task>
return Task>

GetFolderAsync() public method

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

GetFolderFromPathAsync() public static method

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.
return Task

GetFoldersAsync() public method

Gets the folders in the current folder.
public GetFoldersAsync ( ) : Task>
return Task>

GetItemsAsync() public method

Gets the items in the current folder.
public GetItemsAsync ( ) : Task>
return Task>

GetParentAsync() public method

Gets the parent folder of the current folder.
public GetParentAsync ( ) : Task
return Task

IsEqual() public method

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.
return bool

IsOfType() public method

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.
return bool

TryGetItemAsync() public method

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.
return Task