Class FilePath
Static class used to provide functions for file path resolution
Inherited Members
Namespace: DuetControlServer.Files
Assembly: DuetControlServer.dll
Syntax
public static class FilePath
Fields
ConfigFile
Default name of the config file
Declaration
public const string ConfigFile = "config.g"
Field Value
Type | Description |
---|---|
string |
ConfigFileFallback
Fallback file if the config file could not be found
Declaration
public const string ConfigFileFallback = "config.g.bak"
Field Value
Type | Description |
---|---|
string |
ConfigOverrideFile
Config override as generated by M500
Declaration
public const string ConfigOverrideFile = "config-override.g"
Field Value
Type | Description |
---|---|
string |
DsfConfigFile
Extra config file to be run when DCS + all third-party plugins have been started
Declaration
public const string DsfConfigFile = "dsf-config.g"
Field Value
Type | Description |
---|---|
string |
RunOnceFile
File to run once after start if it exists, then deleted again
Declaration
public const string RunOnceFile = "runonce.g"
Field Value
Type | Description |
---|---|
string |
Methods
ToPhysical(string, FileDirectory)
Resolve a RepRapFirmware/FatFs-style file path to a physical file path. The first drive (0:/) is reserved for usage with the base directory as specified in the settings
Declaration
public static string ToPhysical(string filePath, FileDirectory directory)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | File path to resolve |
FileDirectory | directory | Directory containing filePath if it is not absolute is specified |
Returns
Type | Description |
---|---|
string | Resolved file path |
ToPhysical(string, string?)
Resolve a RepRapFirmware/FatFs-style file path to a physical file path. The first drive (0:/) is reserved for usage with the base directory as specified in the settings.
Declaration
public static string ToPhysical(string filePath, string? directory = null)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | File path to resolve |
string | directory | Directory containing filePath if it is not absolute is specified |
Returns
Type | Description |
---|---|
string | Resolved file path |
ToPhysicalAsync(string, FileDirectory)
Resolve a RepRapFirmware/FatFs-style file path to a physical file path asynchronously. The first drive (0:/) is reserved for usage with the base directory as specified in the settings
Declaration
public static Task<string> ToPhysicalAsync(string filePath, FileDirectory directory)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | File path to resolve |
FileDirectory | directory | Directory containing filePath if it is not absolute is specified |
Returns
Type | Description |
---|---|
Task<string> | Resolved file path |
ToPhysicalAsync(string, string?)
Resolve a RepRapFirmware/FatFs-style file path to a physical file path asynchronously. The first drive (0:/) is reserved for usage with the base directory as specified in the settings.
Declaration
public static Task<string> ToPhysicalAsync(string filePath, string? directory = null)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | File path to resolve |
string | directory | Directory containing filePath if it is not absolute is specified |
Returns
Type | Description |
---|---|
Task<string> | Resolved file path |
ToVirtual(string)
Convert a physical ile path to a RRF-style file path. The first drive (0:/) is reserved for usage with the base directory as specified in the settings.
Declaration
public static string ToVirtual(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | File path to convert |
Returns
Type | Description |
---|---|
string | Resolved file path |
ToVirtualAsync(string)
Convert a physical ile path to a RRF-style file path asynchronously. The first drive (0:/) is reserved for usage with the base directory as specified in the settings.
Declaration
public static Task<string> ToVirtualAsync(string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | File path to convert |
Returns
Type | Description |
---|---|
Task<string> | Resolved file path |