Topic: file sharing in c++


Author: tony@online.tmx.com.au (Tony Cook)
Date: 1996/09/23
Raw View
Axel Dahmen (a.dahmen@pop.gun.de) wrote:
: As far as I know, class ios doesn't provide file sharing options. Why?

Because some environments don't offer file sharing, and also file
sharing semantics differ a great deal between platforms.

--
        Tony Cook - tony@online.tmx.com.au
                    100237.3425@compuserve.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: Axel Dahmen <a.dahmen@pop.gun.de>
Date: 1996/09/18
Raw View
clamage@taumet.Eng.Sun.COM (Steve Clamage) wrote:

>Because it is not a feature you can depend on finding in all operating
>systems.

You are right, It's not implemented on all OSs. But should this really
inhibit C++ from offering options like denyread, denywrite or denyreaddwrite?

If file sharing isn't supported by an OS, then creating a stream object with
file sharing options should result in an exception, or the fstream::open()
function should return an error code. Or there could be an additional
function like "unsigned char fstream::shareinf(void)", returning a bit
vector with flags set for each available file sharing option.

It's annoying to write a program and to see that it doesn't run in network
environments just because I wanted to stick with C++.

Best regards



Axel Dahmen
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: Axel Dahmen <a.dahmen@pop.gun.de>
Date: 1996/09/09
Raw View
As far as I know, class ios doesn't provide file sharing options. Why?

Best regards



Axel Dahmen
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Date: 1996/09/11
Raw View
In article <199609082235.AAA08025@picalon.gun.de> Axel Dahmen
<a.dahmen@pop.gun.de> writes:

|> As far as I know, class ios doesn't provide file sharing options. Why?

What do you mean be "file sharing?"  Two distinct ios's can point to the
same streambuf.  What else do you have in mind?
--
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils,    tudes et r   alisations en logiciel orient    objet --
                -- A la recherche d'une activit    dans une region francophone



[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: clamage@taumet.Eng.Sun.COM (Steve Clamage)
Date: 1996/09/11
Raw View
In article AAA08025@picalon.gun.de, Axel Dahmen <a.dahmen@pop.gun.de> writes:
>As far as I know, class ios doesn't provide file sharing options. Why?

Because it is not a feature you can depend on finding in all operating
systems. If you add file sharing to iostreams (or to stdio), you have
to define semantics that can be reasonably satisfied by all systems
that do provide file sharing (and there tend to be significant
differences), and also by systems that do not provide file sharing.

The standard I/O in C and C++ is built around a minimum functionality:
Everything can be written in terms of open, close, read, write, and
maybe seek. That functionality should be available for any stream-like
device on any system. File sharing is not in that category.

Another possbility would be "optional" language features, or "levels
of conformance", but the C++ Committee from the beginning decided
not to have such concepts in the standard.
---
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]