Boost logo

Boost :

From: Ken Hagan (k.hagan_at_[hidden])
Date: 2002-01-28 11:43:42

----- Original Message -----
From: "Jason Stewart" <res0054p_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Monday, January 28, 2002 4:09 PM
Subject: Re: [boost] Thought on paths

> However, if the application specifies a path as "" then
> the library should not prevent that.

I think we have to ask why an application would do that. The most
likely reason is that the application's author was brought up on
UNIX or Windows and thinks that "" is an acceptable name
for a "foo" file on any platform. This isn't true, and the library
interface should encourage the application author to specify the
"myfile" and "foo" components separately, so that they might be
handled appropriately.

> If the application specifies a filename as mypic.jpeg then DOS
> would simply use mypic.jpe. We cannot translate this to
> the more reasonable mypic.jpg because we don't know enough about the
> application.

This is indeed hard, but not impossible. If the program exists to
write files of this type, I would expect whoever ported it to MS-DOS
to provide the correct extension. If, on the other hand, the filename
came from the user, we could probably trust the user to specify the
correct extension.

> See Darin's message for more information but my understanding is the
> original application could not open the file but you could still open
> it at a lower level using the C++ fopen for instance. However, this
> is manipulating the file, not the name.

Yes, I saw Darin's reply. However, if my application writes a JPEG
file, I think it is reasonable that the end user should be able to
use it as a JPEG file. Principally, that means they should be able
to double click on it and launch the correct application.

> As much policy as possible should be pushed into policy classes I
> think.

That's easier said than done. Someone else has already pointed out
that an OS might support several different file systems, and even
if it didn't, users will still want to be able to manipulate files
on alien machines elsewhere on the network.

Boost list run by bdawes at, gregod at, cpdaniel at, john at