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

Re: Funny situation



Pierre Phaneuf wrote:

>Why the GetEntry() method in Directory then? This is one method that

For functions like ppfStat () that don't care about what kind of FS entity
they look at.

>Interestingly, the Add method for File does not check if there is a
>Directory with that name, and vice-versa, so they *are* separate
>namespaces in the current FTP version (you can add a File called "foo"
>and a Directory called "foo" without any error, if you do a
>GetEntry("foo"), you'll get the File. Funny.).
>
>I guess this is a bug.

Right. Thanks.

>> There *are* File::Read () and File::Write (). It's just not in the publicly
>> code in ftp, only in my own tree ;)
>
>And what do they do? Is there an open method? The same object is reused

Yes.

>to do the access? Hmm, I smell some unnecessary state here, but what the
>heck, if this is internal...

Little to nothing.

>> Client apps never, ever see DirEntry. They *only* see the ppf* functions.
>
>No way to get the C++ API for a client? I didn't expect that...

No way. The internals are in a seperate namespace and their headers 
aren't even installed.
If a C++ API is really wanted some iostream-clone should be best. But
that's an issue for the (distant) future.


	Christian
-- 

Drive A: not responding...Formatting C: instead