Boost logo

Boost Users :

From: Daryle Walker (darylew_at_[hidden])
Date: 2005-01-31 14:06:14

On 1/31/05 5:00 AM, "matthias" <matthias_at_[hidden]> wrote:

> I found the error in the meantime by divide and conquer. It wasn't the
> function I posted which caused it, my apologies. I called
> boost::filesystem::file_size without checking if I am actually working on a
> "file" (at least in the boost::filesystem terminology) in some other function.
> This caused an exeption to be thrown.
> Frankly, I don't think this behaviour of file_size is appropriate. In UNIX,
> for example, directories are files too. Therefore, file_size should return 0
> when called on a directory because it's not really an exceptional situation to
> call file_size on a directory (which, as said above, often is a file).
> Any comments?

Don't forget new-wave file-systems where directories can contain data. (In
that case, a file is just a directory that has file-nesting disabled.)

Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT hotmail DOT com

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at