Previous Next


                                                 179
        SECTION 3.10                                                         File Specifications



3.10.1 File Specification Strings

        The standard format for representing a simple file specification in string form
        divides the string into component substrings separated by the slash character (/).
        The slash is a generic component separator that is mapped to the appropriate
        platform-specific separator when generating a platform-dependent file name.
        Any of the components may be empty. If a component contains one or more
        literal slashes, each must be preceded by a backslash (\), which in turn must be
        preceded by another backslash to indicate that it is part of the string and not an
        escape character. For example, the string

           ( in \ \ /out )

        represents the file name

           in / out

        The backslashes are removed in processing the string; they are needed only to
        distinguish the component values from the component separators. The
        component substrings are stored as bytes and are passed to the operating system
        without interpretation or conversion of any sort.


        Absolute and Relative File Specifications

        A simple file specification that begins with a slash is an absolute file specification.
        The last component is the file name; the preceding components specify its
        context. In some file specifications, the file name may be empty; for example,
        URL (uniform resource locator) specifications can specify directories instead of
        files. A file specification that does not begin with a slash is a relative file
        specification giving the location of the file relative to that of the PDF file
        containing it.

        In the case of a URL-based file system, the rules of Internet RFC 1808, Relative
        Uniform Resource Locators (see the Bibliography), are used to compute an
        absolute URL from a relative file specification and the specification of the PDF
        file. Prior to this process, the relative file specification is converted to a relative
        URL by using the escape mechanism of RFC 1738, Uniform Resource Locators, to
        represent any bytes that would be either unsafe according to RFC 1738 or not
        representable in 7-bit U.S. ASCII. In addition, such URL-based relative file
        specifications are limited to paths as defined in RFC 1808. The scheme, network

Previous Next