ResourceURI.FromApplicationRelativePath(path)

Returns a C # object of the
ResourceURI
type, with the
URIType
of
ApplicationRelative
that contains a relative path to a file in relation to the
ApplicationFiles
folder.
static ResourceUri FromApplicationRelativePath(string
path
);

Arguments

path
(string)
A relative path to a file in relation to the
ApplicationFiles
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#
applicationRelativeResourceURI
object of the
ResourceURI
type that contains the
Text1.txt
relative path. The object is used as an argument of the .NET
WriteAllText API
to create a
Text1.txt
text file inside the
ApplicationFiles
folder.
var applicationRelativeResourceUri = ResourceUri.FromApplicationRelativePath("Text1.txt"); Log.Info(applicationRelativeResourceUri.ApplicationRelativePath); File.WriteAllText(applicationRelativeResourceUri.Uri, "Hello world!");
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.