[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Moon: Issue: Pathname-subdirectory-list]



    Date: 23 Oct 87 15:37 PDT
    From: Masinter.pa

	 ----- Begin Forwarded Messages -----

    Date: Thu, 16 Jul 87 20:14 EDT
    From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
    Subject: Issue: Pathname-subdirectory-list

	Date: 15 Jul 87 13:24 PDT
	From: Masinter.pa@Xerox.COM

	PROBLEM DESCRIPTION:

	It is impossible to write PORTABLE code that can produce a pathname
	based on directory plus SUBDIRECTORY information. If the directory used
	is not a root, then the string provided must contain OS-specific
	separators. This defeats the purpose of having an abstraction like
	pathname. Specifying a subdirectory RELATIVE to the current default is
	possible but also inconvenient and non-portable.

	This problem is even worse for programs running on machines on a network
	that can retrieve files from multiple hosts, each using a different OS
	and thus a different subdirectory delimiter.


    The solution to this problem that Symbolics has used for years works
    quite well.  The directory is a structured field whose value is returned
    as a list of strings, one string for each subdirectory level.  In
    addition to strings, in our system we allow certain keywords in the
    list, enumerated below....


I might add that Kyoto / Ibuki Common Lisp uses this system too, and it
makes it quite simple to write code which ports to implementations which
run on other file systems.  One notable case was a test suite which was
written on Unix and moved to VMS with no trouble.

I highly recommend this technique.
-------