Plasma GitLab Archive
Projects Blog Knowledge

Class Pxp_reader.resolve_as_file


class resolve_as_file : ?file_prefix:[ `Allowed | `Not_recognized | `Required ] -> ?host_prefix:[ `Allowed | `Not_recognized | `Required ] -> ?system_encoding:Pxp_core_types.I.encoding -> ?map_private_id:Pxp_core_types.I.private_id -> Neturl.url -> ?open_private_id:Pxp_core_types.I.private_id ->
Pervasives.in_channel * Pxp_core_types.I.encoding option -> ?base_url_defaults_to_cwd:bool -> ?not_resolvable_if_not_found:bool -> unit ->
resolver
Reads from the local file system. file URL's are interpreted as file names of the local file system, and the referenced files are opened.

The full form of a file URL is: file://host/path, where host specifies the host system where the file identified path resides. host="" or host="localhost" are accepted; other values will raise Not_competent. The standard for file URLs is defined in RFC 1738.

Option file_prefix: Specifies how the file: prefix of file names is handled:

  • `Not_recognized: The prefix is not recognized.
  • `Allowed: The prefix is allowed but not required (the default).
  • `Required: The prefix is required.
Option host_prefix: Specifies how the //host phrase of file names is handled:
  • `Not_recognized: The phrase is not recognized.
  • `Allowed: The phrase is allowed but not required (the default).
  • `Required: The phrase is required.
Option system_encoding: Specifies the encoding of file names of the local file system. Default: UTF-8.

Options map_private_id and open_private_id: These options are deprecated and no longer described here.

Option base_url_defaults_to_cwd: If true, relative URLs are interpreted relative to the current working directory at the time the class is instantiated, but only if there is no parent URL, i.e. rid_system_base=None. If false (the default), such URLs cannot be resolved. In general, it is better to set this option to false, and to initialize rid_system_base properly.

Option not_resolvable_if_not_found: If true (the default), "File not found" errors stop the resolution process. If false, "File not found" is treated as Not_competent.


This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml