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

SETF and pathname slots



    Date: 16 Apr 87 17:01 PDT
    From: ghenis.pasa@Xerox.COM

    Should the standard require SETF to handle pathname slots? If we are
    going to have MAKE-PATHNAME, PATHNAME-DEVICE, etc, for consistency we
    should also have COPY-PATHNAME and be able to do things like (SETF
    (PATHNAME-TYPE old-path) "OLD"). Is there any reason not to?

Careful.  Not all systems have pathnames which can be modified.
In our case, it's because we want to preserve EQness of pathnames
with the same components.  In other (hypothetical) cases, a pathname
may be an operating-system-related object that you aren't allowed
to directly modify; you request a new one.

The answer is to treat (SETF (PATHNAME-NAME PATH) NEW-NAME)
like (SETF PATH (MAKE-PATHNAME :NAME NEW-NAME :DEFAULTS PATH)).
This is analogous with SETF of LDB.