Re: finding how much the file system is full, from a C program?
- From: "Herbert Rosenau" <os2guy@xxxxxxxxxxxxx>
- Date: Tue, 31 Oct 2006 10:29:20 +0000 (UTC)
On Tue, 31 Oct 2006 07:30:52 UTC, SM Ryan
<wyrmwif@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
"Herbert Rosenau" <os2guy@xxxxxxxxxxxxx> wrote:I guess you're unable to understund a bit complex sentences an
# > In ANSI C you can do something like
# > system("df -k /mnt/mvdg1/vset >/tmp/df-k");
#
# That is not ANSI C. The parameter of system is system dependant and
# unportable.
Nice try, kid, but the system() function has been in ANSI C
from the beginning.
# On my system is no directory mnt.
And I guess you don't know enough C to use program arguments
or how to construct strings.
paragraphs containing more than one simple sentence.
system(argv[1]); is 100% standard compilant - if the parameter
contains an valid (path)filename.
system("myprog z:\\blah\\blubber-foo.bar.boo"); may not even
impletation compilant as it relays on the filesystem the path points
to.
The same is for fopen().
C itself knows nothing about directories, devises, files. All that is
implementation dependant. So you're outside the topic of this group.
Has you ever written a failsave program that handles direcetories
(when supported) and files and had to print to an printer of unknown
type and location but NOT to stdout or stderr who has to run on MVS,
DOS, Windows NT, 2K, XP, Linux, BSD, OS/2 on FAT16, FAT32, NTFS, HPFS,
JFS...? I'm sure the answer is NO.
Else you would know where the limits of standard C are and how to
handle that propper.
Yes it is possible to write programs who are completely standard
compilant - I've done that often enough to have the same source
running on every C compilant environment. But more often you must use
some implementation specific extensions to get your work done. It is
essential to know the limits of standard C.
--
Tschau/Bye
Herbert
Visit http://www.ecomstation.de the home of german eComStation
eComStation 1.2 Deutsch ist da!
.
- References:
- Re: finding how much the file system is full, from a C program?
- From: Herbert Rosenau
- Re: finding how much the file system is full, from a C program?
- From: SM Ryan
- Re: finding how much the file system is full, from a C program?
- Prev by Date: Re: I have a problem in my study
- Next by Date: Re: realloc(): invalid next size
- Previous by thread: Re: finding how much the file system is full, from a C program?
- Next by thread: Re: finding how much the file system is full, from a C program?
- Index(es):
Relevant Pages
|
|