ResourceURI.FromProjectRelativePath(path)

Returns a C# object of the
ResourceURI
type, with the
URIType
of
ProjectRelative
and that contains a relative path to a file than the
ProjectFiles
folder.
static ResourceUri FromProjectRelativePath(string
path
);

Arguments

path
(string)
A relative path of a file in relation to the
ProjectFiles
folder.

Returns

ResourceURI
A C# object that contains the path indicated in the argument.

Example

The following example shows an API that returns a C#
projectRelativeResourceURI
object of the
ResourceURI
type that contains the relative path
Text1.txt
. The object is used as an argument of the .NET
WriteAllText
API to create a
Text1.txt
text file inside the
ProjectFiles
folder.
var projectRelativeResourceUri = ResourceUri.FromProjectRelativePath("Text1.txt"); Log.Info(projectRelativeResourceUri.ProjectRelativePath); File.WriteAllText(projectRelativeResourceUri.Uri, "Hello world!");
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.