ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Mobile specific functions / URI functions
  • Properties specific to URI variables
  • Functions that use URI variables
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
URI (Variable type)
In french: URI
The URI (Uniform Resource Identifier) type identifies physical or abstract resources (e.g. files or Web pages).
There are two types of URIs:
  • URL (Uniform Resource Locator): identifies a resource through its means of access and location..
    Examples:
    • Web address: https://www.pcsoft.fr/windevmobile/index.html
    • File location on disk: file:///C:/Users/johndoe/Documents/log.txt
  • URN (Uniform Resource Name): identify a resource by its name. They do not make it possible to locate the resource but must remain unique and persist even if the resource no longer exists or becomes unavailable.
    Example: ISBN number of a book: urn:isbn:0-395-36341-1
A URI can be represented as a character string whose syntax complies with the standard defined by RFC 3986. Each URI can contain up to five parts:
<schéma>: [//<autorité>]<chemin>[? <requête>] [ # <fragment> ]
  • The URI scheme is a letter followed by any combination of letters, numbers, plus sign (+), period (.) or dash (-) and ends with a colon (:). In the case of a URL, it generally corresponds to the protocol to be used to access the resource: http, https, ftp, etc.
  • The authority of the URI is an optional part that corresponds to the identification information to access the resource. Its format is usually:
    [<utilisateur>[:<mot de passe>]]hôte[:<port>]
  • The path is a sequence of segments separated by slashes (/). In the case of a URL on a Web page for example, it represents the path to the resource on the host.
  • The request is an optional part preceded by a? and followed by a set of pairs ' key=value' separated by '&'. In the case of a URL on a web page for example, it allows you to pass named parameters to the page.
  • The fragment is an optional part preceded by a '#' that allows providing additional information to access a secondary resource (page number, anchor of an HTML page, etc.).
Example of URI:
Note: For more details on the declaration of this type of variable and the use of WLanguage properties, see Declaring a variable.
Example
Properties

Properties specific to URI variables

The following properties can be used to handle URI variables:
Property nameType usedEffect
AuthorityCharacter string
  • "Authority" part of the URI,
  • Empty string if not specified.
This property is available in read and write mode.
FragmentCharacter string
  • Fragment of the URI,
  • Empty string if not specified.
This property is available in read and write mode.
HostCharacter string
  • Host of the URI,
  • Empty string if not specified.
This property is available in read and write mode.
Warning: If the Host property is modified:
  • the properties User and Password are reset: these two properties must then be filled in..
  • the Port property is reset: the Port property must also be set.
PathCharacter stringPath of the URI.
This property is available in read and write mode.
PortInteger
  • Port number (between 1 and 65365),
  • 0 if not specified.
This property is available in read and write mode.
QueryCharacter string
  • Query found in the URI,
  • Empty string if not specified.
This property is available in read and write mode.
SchemeCharacter stringScheme found in the URI.
If changes are made, this property is mandatory and cannot be empty.
This property is available in read and write mode.
UserCharacter stringUsername.
This property is available in read and write mode.
UserPasswordCharacter string
  • User password,
  • Empty string if not specified.
This property is available in read and write mode.
ValueCharacter stringComplete URI.

You can use VariableReset to reset the contents of a variable of type URI.
Remarks

Functions that use URI variables

The following functions handle URI variables:
BufferToURISaves the contents of a buffer to a resource identified by its URI.
FileToURISaves the contents of a file to a resource identified by its URI.
URIGetInfoRetrieves information of a URI resource.
URISelectOpens a system window to select a resource from:
  • from the device file system,
  • from the Cloud (Google Drive, Microsoft OneDrive, etc.)
  • or from one of the content managers installed on the device.
URIToBufferLoads in the background the content of a resource (image, text, etc.) identified by its URI in a buffer variable.
URIToFileSaves, in the background, the content of a resource (image, text, etc.) identified by its URI in an external file.
See also
Minimum version required
  • Version 24
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/25/2024

Send a report | Local help