-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
You can't because what you try to open there isn't a file
I agree with you so far.
but something
that you only get at via a network connection, using the HTTP protocol.
Sorry, but here's where I disagree.
A file (at least in C), is something external. There are no more details
in the C standard than that as to how a file is implemented external to
C. A stream is associated to a file by way of the fopen() function. If
fopen() can manage it, then whatever the named resource actually
represents, it is a file to C.
Consider, on a MSWindowsish environment,
fopen("\\\\SERVER\\SHARE\\file.txt","r")
can be a valid file open, even though it represents data "that you only
get via a network connection".
Similarly, on MVS,
fopen("DDNAME:SYSIPT","r");
opens a real file, but the file isn't named "DDNAME:SYSIPT". The logical
name to physical name translation is managed by the stdio library.
/If/ the OP's C implementation handled URL-formatted filenames, /then/
fopen("
http://server/file.jpg","r");
would be just as legal as
fopen("\\\\SERVER\\SHARE\\file.txt","r")
or
fopen("DDNAME:SYSIPT","r");
is to their respective C implementations. This is a
quality-of-implementation issue, not a language issue.
Standard C has no functions for doing such things
as managing, through an implementation-independant C language feature,
network access. However, the C standard does not restrict an
implementation from providing such a feature, so long as it is handled
as part of the "implementation defined" aspects of the standard C
language features.
and if it is possible
to get at such an external file you will have to use some platform spe-
cific extensions
if your C implementation does not offer such a facility through one of
the standard C language features
.
Thus you will have to ask in a group dedicated to the
system
or C compiler
you're working with - I guess in your case some Windows programm-
ing group.
Regards, Jens
- --
Lew Pitcher, IT Consultant, Enterprise Data Systems
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFBrL5QagVFX4UWr64RAuOnAJ9orQG8URxZl1fzD1QLPmD2Fee0rQCg5VJB
g/y0FeI7wnq58Ri8/jcES6Y=
=wsZt
-----END PGP SIGNATURE-----