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


FILE-WRITE-DATE and FILE-AUTHOR are both vague on what
happens if the file does not exist.  The text says:

    @I[file] can be a filename or a stream that is open to a file.
    This returns the time at which the file was created or last
    written as an integer in universal time format (see section 25.4.1),
    or NIL if this cannot be determined.

(FILE-AUTHOR is similar).

My reading of this is that the phrase "if this cannot be determined"
means "determined by looking at the file", not "determined for any
reason".  I think the intent here is to cover such situations as
an operating system which doesn't support creation dates, or a
network link which doesn't support inquiring about dates.

Situations like giving the wrong pathname, temporary network failure,
or no access rights should signal an error.

PROBE-FILE and DIRECTORY are also a bit vague on these matters, saying
nothing about what happens when you can't inquire about files due to
network failure or no access rights.

I also think that if the directory doesn't exist, you should get an
error, not just return NIL, but this would need to wait until we have an
error system, or the incompatibility would be too large.

USER-HOMEDIR-PATHNAME says "if it is impossible to determine this
information, then NIL is returned instead of a pathname;".  It's
not clear whether this means "is impossible right now due to a
system error" or "is impossible to inquire of that host".  Returning
NIL due to a transient condition is both uninformative to the user
and may lead to suprising behaviour, like reading in the wrong files
or refusing to do something.

The :IF-DOES-NOT-EXIST NIL option to OPEN does not say what it
does about things like network errors, etc.

A lot of people seem to assume that if CLtL doesn't say anything
about errors, then a function may not signal any errors, even if
something goes wrong.  Hopefully the new error system standard will
address a lot of these issues, but some clarification (or at least
agreement on the intent) would help now.