Show / Hide Table of Contents

Class FileSystemHelper

Extends the functionality of FileSystem objects to convert into their Phoenix counterparts

Inheritance
System.Object
FileSystemHelper
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Phoenix.DeviceStorage
Assembly: Phoenix.Abstractions.DeviceStorage.dll
Syntax
public static class FileSystemHelper

Properties

View Source

PhoenixTempPath

Gets the temp files path for Phoenix.

Declaration
public static string PhoenixTempPath { get; }
Property Value
Type Description
System.String

Methods

View Source

GetDirectoryName(String, PhoenixIOType)

Gets the DirectoryName of the PhoenixIOType

Declaration
public static string GetDirectoryName(string path, PhoenixIOType type)
Parameters
Type Name Description
System.String path

The path.

PhoenixIOType type

The type of path.

Returns
Type Description
System.String

DirectoryName, null if path is null, root or empty string/white space.

Remarks

Unless the type is set to WindowsSystem this will not do Path validation, as this method should be used in conjunction with the PhoenixPath (which will validate the path).

View Source

GetName(String)

Gets the name of file or directory

Declaration
public static string GetName(string path)
Parameters
Type Name Description
System.String path

The path.

Returns
Type Description
System.String

The file/directory name, or null if path is null.

Remarks

This will not do Path validation, as this method should be used in conjunction with the PhoenixPath (which will validate the path).

View Source

GetPathRoot(String, PhoenixIOType)

Gets the path root of a PhoenixIOType

Declaration
public static string GetPathRoot(string path, PhoenixIOType type)
Parameters
Type Name Description
System.String path

The path.

PhoenixIOType type

The type of path.

Returns
Type Description
System.String

Path root, null if path is empty or no root could be found.

Remarks

Unless the type is set to WindowsSystem this will not do Path validation, as this method should be used in conjunction with the PhoenixPath (which will validate the path).

View Source

GetTempFileName()

Attempts to create a temp file and logs failures if a file can not be created.

Declaration
public static string GetTempFileName()
Returns
Type Description
System.String

Returns the path to a temp file if created successfully.

View Source

TryDeleteFile(String)

Tries to delete a file.

Declaration
public static bool TryDeleteFile(string filePath)
Parameters
Type Name Description
System.String filePath

The path to the file to delete.

Returns
Type Description
System.Boolean

Returns true if the file is successfully deleted. Otherwise false.

View Source

TryDeletePhoenixTempDirectory()

Tries to delete the temp file directory for Phoenix.

Declaration
public static bool TryDeletePhoenixTempDirectory()
Returns
Type Description
System.Boolean

Returns true if the delete was successful. Otherwise false.

  • View Source
In This Article
Back to top Generated by DocFX