[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Probe-File and proposed extension.
There are circumstances where being able to validate a filename as
potentially writable without actually writing that file would be
The specific problem I want to solve involves the the "Visit File"
command in Hemlock. If you visit a file that exists, you read the
file, and the pathname associated with the buffer becomes the truename
of the file; no problem there. The question is what do you do if
Probe-File of the filename is false? Does this mean that the file
simply doesn't exist, or does it mean that the filename is somehow
broken? An example of a broken filename would be one with a
nonexistant directory or device.
If the filename is broken it would be useful to be able to
tell the user this when he visits the file, rather than getting some
error when he tries to save it. It is also useful to be able to get
the name of the file that you expect to be created, since then you can
set the buffer pathname to that, rather than leaving it a relative
pathname until the file is actually created.