TX Text Control .NET Server

GetFileDirectoryAsync Method

Method|Introduced in 21.0
Namespace
TXTextControl.Web
Package
None: the TX Text Control .NET Server setup installs it, for .NET Framework.
Assembly
TXTextControl.Web.dll

Description

Returns the directory path where the files of a specific file type are stored.

Syntax

public async System.Threading.Tasks.Task<string> GetFileDirectoryAsync(Web.FileType type);

Parameters

ParameterDescription
type

Specifies one of the FileType values.

Return Value

Returns a System.Threading.Tasks.Task object containing the directory path where the files of a specific file type are stored. The return value is null, if no directory path was specified.

Examples

GetFileDirectoryAsync is not exposed by the current ASP.NET Core editor helper. The following example uses SetFileDirectory in the current server-side setup instead.

var result = textControl.SetFileDirectory("Quarterly report", TXTextControl.Web.FileType.Document);
Console.WriteLine(result);