Main Content

mlreportgen.utils.fileToURI

Convert file path to Universal Resource Identifier

Description

uri = mlreportgen.utils.fileToURI(filename) converts filename to a Universal Resource Identifier (URI).

URIs are strings that specify the name of a file and the path to that file. URIs allow access to a resource over a network. Web addresses (URLs) are a type of URI. For more information about URIs, see the URI specification at the World Wide Web Consortium website.

example

Examples

collapse all

uri = mlreportgen.utils.fileToURI...
   ("C:/Users/jsmith/Desktop/200-C Form.pdf")
uri = 

    "file:///C:/Users/jsmith/Desktop/200-C%20Form.pdf"

Input Arguments

collapse all

Name or full path of the file to convert, specified as a character vector or string scalar. For a full list of unencoded, reserved, and encoded ASCI characters, see More About.

Output Arguments

collapse all

URI of the file, returned as a character vector or string scalar.

More About

collapse all

Version History

Introduced in R2018b