Boost logo

Boost Users :

Subject: Re: [Boost-users] [filesystem] wpath and fopen() on windows
From: Paul (elegant_dice_at_[hidden])
Date: 2010-02-23 09:44:09


A repost, as I still don't know the answer...

> Ok so ... I have a wpath, and an interface that looks something like this:
>
> xyz.openFile( const char* name );
> xyz.openFileDesc( int fd );
> xyz.openFileHandle( FILE * file );
>
> How do I go from a wpath to a filedescriptor?
> This doesn't work:
>
> fs::ifstream file( path );
> xyz.openFileDesc( file.fd() );

Do I have to use the native wfopen in windows and fopen in linux (and
the usual #ifdef hackery), or is there a "standard" way I can open a
file with wpath on all platforms?

Thanks
Paul


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net