Class DeviceStorageManager
Performs operations on String instances that contain file or directory path information.
Inheritance
Implements
Inherited Members
Namespace: Phoenix.DeviceStorage
Assembly: Phoenix.Plugin.DeviceStorage.dll
Syntax
public class DeviceStorageManager : IDeviceStorageManager
Constructors
View SourceDeviceStorageManager()
Initializes a new instance of the DeviceStorageManager class.
Declaration
public DeviceStorageManager()
Methods
View SourceCopyDirectoryFromDeviceAsync(PhoenixPath, PhoenixPath)
Copies a directory from the device to a Windows System directory
Declaration
public Task CopyDirectoryFromDeviceAsync(PhoenixPath source, PhoenixPath destination)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | source | The directory that is being copied. |
PhoenixPath | destination | The destination of the copied directory. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
CopyDirectoryToDeviceAsync(PhoenixPath, PhoenixPath)
Copies a directory from the Windows System to a device directory.
Declaration
public Task CopyDirectoryToDeviceAsync(PhoenixPath source, PhoenixPath destination)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | source | The directory that is being copied. |
PhoenixPath | destination | The destination of the copied directory. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
CopyFileFromDeviceAsync(PhoenixPath, PhoenixPath)
Copies a file from the device to a Windows System directory
Declaration
public Task CopyFileFromDeviceAsync(PhoenixPath source, PhoenixPath destination)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | source | The file that is being copied. |
PhoenixPath | destination | The destination of the copied file. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
CopyFileToDeviceAsync(PhoenixPath, PhoenixPath)
Copies a file from the Windows System to a device directory.
Declaration
public Task CopyFileToDeviceAsync(PhoenixPath source, PhoenixPath destination)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | source | The file that is being copied. |
PhoenixPath | destination | The destination of the copied file. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
CreateDirectoryAsync(PhoenixPath)
Creates a directory on the specified device.
Declaration
public Task CreateDirectoryAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The directory path where the directory will be created. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
CreateFileAsync(PhoenixPath)
Creates a file on the specified device.
Declaration
public Task CreateFileAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The file path where the file will be created. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
DeleteDirectoryAsync(PhoenixPath)
Deletes a directory from the specified device.
Declaration
public Task DeleteDirectoryAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The directory path to delete. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
DeleteFileAsync(PhoenixPath)
Deletes a file from the specified device.
Declaration
public Task DeleteFileAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The file path to delete. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
DirectoryExistsAsync(PhoenixPath)
Checks if a directory exists on the device.
Declaration
public Task<bool> DirectoryExistsAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The path of the directory. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if the directory exists, false otherwise. |
FileExistsAsync(PhoenixPath)
Checks if a file exists on the device.
Declaration
public Task<bool> FileExistsAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The path of the file. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Boolean> | True if the file exists, false otherwise. |
GetAppPackagesAsync(PhoenixPath)
Gets the Packages on a device.
Declaration
public Task<IEnumerable<PhoenixDirectoryInfo>> GetAppPackagesAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The path to get the app packages from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PhoenixDirectoryInfo>> | An IEnumerable of the Packages. Null if capability can not be found. |
GetDirectoriesAsync(PhoenixPath)
Gets the DirectoryInfo on a device.
Declaration
public Task<IEnumerable<PhoenixDirectoryInfo>> GetDirectoriesAsync(PhoenixPath directoryPath)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | directoryPath | The path to get the DirectoryInfo on. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PhoenixDirectoryInfo>> | An IEnumerable of the DirectoryInfo. Null if capability can not be found. |
GetDirectPath(PhoenixPath, out PhoenixPath)
Gets the direct path to the file or directory as it would be accessible on the local file system and network
Declaration
public bool GetDirectPath(PhoenixPath path, out PhoenixPath directPath)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The path to convert. |
PhoenixPath | directPath | The filled in direct path. |
Returns
Type | Description |
---|---|
System.Boolean | True if the path could be translated to the local file system or network, false otherwise. |
GetDrivesAsync(PhoenixPath)
Gets the DriveInfo on a device. Will work only for FileSystemIO and TitleFileSystem.
Declaration
public async Task<IEnumerable<PhoenixDirectoryInfo>> GetDrivesAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The path to get the DriveInfo from. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PhoenixDirectoryInfo>> | An IEnumerable of the DriveInfo. Null if capability can not be found. |
GetFilesAsync(PhoenixPath)
Gets the PhoenixFileInfo on a device.
Declaration
public Task<IEnumerable<PhoenixFileInfo>> GetFilesAsync(PhoenixPath filePath)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | filePath | The path to get the PhoenixFileInfo on. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PhoenixFileInfo>> | An IEnumerable of the PhoenixFileInfo. Null if capability can not be found. |
GetFileSystemEntriesAsync(PhoenixPath)
Gets the PhoenixFileSystemInfo on a device - includes DirectoryInfo and PhoenixFileInfo.
Declaration
public async Task<IEnumerable<PhoenixFileSystemInfoBase>> GetFileSystemEntriesAsync(PhoenixPath path)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | path | The path to get the PhoenixFileSystemInfo on. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<PhoenixFileSystemInfoBase>> | An IEnumerable of the PhoenixFileSystemInfo. Null if capability can not be found. |
MoveDirectoryFromDeviceAsync(PhoenixPath, PhoenixPath)
Moves a directory from the device to a Windows System directory
Declaration
public Task MoveDirectoryFromDeviceAsync(PhoenixPath source, PhoenixPath destination)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | source | The directory that is being moved. |
PhoenixPath | destination | The destination the directory will move to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |
MoveFileFromDeviceAsync(PhoenixPath, PhoenixPath)
Moves a file from the device to a Windows System directory
Declaration
public Task MoveFileFromDeviceAsync(PhoenixPath source, PhoenixPath destination)
Parameters
Type | Name | Description |
---|---|---|
PhoenixPath | source | The file that is being moved. |
PhoenixPath | destination | The destination the file will move to. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A System.Threading.Tasks.Task representing the result of the asynchronous operation. |