::> HB> Is there a way to identify the mode that an fstream was opened in?
::> HB> (binary vs. text -- borland 4.5)
::> None of which I'm aware, but fortunately, it shouldn't be terribly
::> difficult to add the capability yourself:
::> class my_stream : public fstream {
::> int mode_;
I don't know if there's a way to use it, but the filebuf class already has a
mode member (protected:) which stores this information. Still, deriving a
new class similar to the above seems a safer/easier way to capture the
parameter...
::> You may have to add a few more things to this; for example, I believe
::> Borland supports a third parameter that determines the sharing allowed
::> with the file, and you may want to support that as well. Likewise, you
Yeah, it has an optional 3rd protmode parameter, which I've never used :)
Thanks,
# Herbert Bushong harchon@centuryinter.net [TEAM OS/2]
- Blackbeard's BBS Intelec: 239:600/0
+ Fido: 1:19/19 http://www.intelec.com/software/
---
RM 1.31 2508 Is a castrated pig disgruntled?
---------------
* Origin: Blackbeard's BBS - Ville Platte, LA - 318-468-3385 (1:19/19)
|