Skip to main content

FileDownload

A class in Root.Township, Alta.

Result type for console commands that write a file for the caller, stored under the game's storage folder in Command Output, one subfolder per calling user. A string converts to it implicitly.

Constructors​

MemberWhat it is
FileDownload(string url)Creates a FileDownload from url.

Fields​

MemberWhat it is
static string FolderRoot output folder: Command Output inside the game's storage folder.
1 private and internal field
MemberWhat it is
private static Logger loggerNLog logger.

Properties​

MemberWhat it is
string DownloadUrl { get; set; }The file name (serialised as downloadUrl) the command output is written to.

Methods​

MemberWhat it is
static string GetPath(string input)Full path for a file in the calling user's output folder. Logs an error and returns the root if there's no command context.
static FileDownload op_Implicit(string url)Lets a command return a file name string as a FileDownload.
StreamWriter OpenWrite()Deletes any old file at this path and opens a new text file for writing.

Used in​

Members of other types that take, return or hold a FileDownload: