home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!usc!enterpoop.mit.edu!eru.mt.luth.se!lunic!sunic!dkuug!diku!ballerup
- From: ballerup@diku.dk (Per Goetterup)
- Newsgroups: comp.lang.pascal
- Subject: Re: TP's reset on read-only files
- Message-ID: <1992Dec15.130511.20894@odin.diku.dk>
- Date: 15 Dec 92 13:05:11 GMT
- References: <1992Dec12.214246.50@newton.hartwick.edu> <1992Dec14.022920.4467@uwasa.fi>
- Sender: ballerup@ask.diku.dk
- Organization: Department of Computer Science, U of Copenhagen
- Lines: 43
-
- ts@uwasa.fi (Timo Salmi) writes:
-
- >In article <1992Dec12.214246.50@newton.hartwick.edu> wisanr@newton.hartwick.edu writes:
- >>I've been astonished to discover that TP's reset procedure can't open a
- >>read-only file ex@|cept as a text file. This appears to be true of
-
- >Sorry. This claim just is not true.
-
- >>The only work-around I've found is to change the attribute, open and
- >>read the file, close it, and put it back to read-only. I don't like it because
-
- >Not necessary.
-
- >>Now, what?
-
- >Simple:
- >FileMode := 0;
-
- This only allows read access to the file. If you want to modify it (write into
- it), then you'll have to go the long way - changing the attributes and so on.
-
- Now somebody might argue that a file that's to be modified shouldn't be read-
- only, but what if you're updating something in a file, maintained by your
- program but not to be modified (or erased) by the user. It would be natural to
- keep that file readonly, but you still have to modify it, thus the work-around.
-
- Code on...
-
- Per.
- --
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- | Per Goetterup, Student, DIKU InterNet: ballerup@ask.diku.dk |
- | pgoetter@nyx.cs.du.edu |
- | FidoNet: 2:231/91.10 -or- Per.Goetterup@p10.f91.n231.z2.fidonet.org |
- | |
- | DIKU is the department of Computer Science at the University of Copenhagen. |
- |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
- | The most merciful thing in the world I think, is the inability of the human |
- | mind to corrolate all its contents... - H.P. Lovecraft, 1926 - |
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- "...Gothic horror shades the dreams, kaleidoscope of what a nightmare means..."
- ('Crash Course in Seduction', A Split-Second)
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-