frontier5.5 picture




macos picture

windows picture




Powerful
cross-platform
web scripting
Home
Frontier5
Download
Mail
Docs
Bugs
Outline
Thanks!

File Paths in Frontier 5

We're adding special support for Windows file paths in Frontier 5.

Here's the new rule we're implementing.

If a string begins with an alpha character followed by a colon and a backslash, we will not process the string in any way.

Example

Suppose you're entering the path for a website folder in a cell in the object database:

c:\websites\testsite\faq.htm

Without a special filter, this would turn into:

c:websites\testsitefaq.htm

Note that \t is the specifier for a tab character.

Like C and other programming languages, Frontier implements the backslash character specially. Since PC file name syntax requires the use of backslashes, without a special case, the file path gets badly mangled.

Conclusion: the people who designed MS-DOS, the precedent of Windows, didn't program in C.

Another special case

Chuck Shotton has been evangelizing the use of web URL syntax, and now I get what he's been saying. So we'll add another special case.

You could specify the same file as follows:

file:///c/websites/testsite/faq.htm

So when Frontier sees a string that begins with file:/// it invisibly converts the string to the syntax appropriate to the OS platform that Frontier is running on. On the Mac it would generate a colon-delimited file path, on Windows a backslash-delimited string.

This syntax is cool because it would work on either Mac or Windows. Frontier knows what OS you're running on, and can do the translation into the local file system.

We'll do this too in Frontier 5.

Places

Here's a (possibly incomplete) list of places that need to be visited to make this happen:

  • Entering a literal string into the object database editor.

  • String constants in UserTalk scripts.

  • In html.processMacros.

Fri, Sep 12, 1997 at 8:49:57 AM by DW


This page was originally posted on 9/12/97; 8:42:12 AM. It was last built on 10/5/97; 12:45:08 PM with Frontier. Internet service provided by Conxion.