Subject: Re: Re:xp stat needed
From: Mike Nordell (tamlin@algonet.se)
Date: Sun Nov 11 2001 - 08:37:21 CST
Tomas Frydrych wrote:
>
> > >I need a XP way of testing for the existence of a directory to fix bug
> > >1545. According to my information stat should be availble on Unix
> > >and Win32, but it is not ANSI. I suspect we will need to implement
> > >UT_stat; any takers?
> > >
> > Do you really need UT_stat funtionality or a UT_exists functionality?
>
> I need to be able to tell both that it exists and that it is a directory,
> so probably proper stat would be best.
So what's holding us back from declaring a simple XAP class called
FileSystem that only holds static member functions (as a surrogate for
namespace) with function like
bool isDirectory(const char* pszFsEntry);
that is implemented in platform dependent XAP .cpp files?
The Win32 MSVC CRT has a _stat function and AFAIK all unices has it (without
the leading underscore), and for the platforms that does not have it...
Well, they can implement it in their platform preferred way. For PDAs
without directories it might be a problem though. :-)
This could also be the place to put getFileSize, createDirecory and any and
all such filesystem operations.
Am I nuts?
/Mike
This archive was generated by hypermail 2b25 : Sun Nov 11 2001 - 08:39:24 CST