Thread View: comp.os.msdos.programmer
1 messages
1 total messages
Started by Eduardo Salom
Wed, 15 Aug 1990 16:36
turbo pascal 5.0 SetFAttr ...
Author: Eduardo Salom
Date: Wed, 15 Aug 1990 16:36
Date: Wed, 15 Aug 1990 16:36
26 lines
1596 bytes
1596 bytes
>from: eduardo@m2xenix.psg.com (Eduardo Salom)
Subject: turbo pascal 5.0 SetFAttr help....
in article <31924@eerie.acsu.Buffalo.EDU> lyda@sybil.cs.Buffalo.EDU (kevin
lyda) says:
> setfattr(f,directory); {hidden directory, no dos }
> {error from getfattr }
> writeln(log,doserror); {-??-> 5 }
>
> question: why is file access denied? when i hide an archive file i
> can unhide it later, but not directories. is this a bug and more
> importantly, is there a way i can hide AND unhide directories?
The call to SetFAttr must have the directory bit off. Replace
SetFAttr( f, directory ) by SetFAttr( f, $0 ) and the program will work.
This is explained in the MS-DOS technical reference manual (CHMOD).
I didn't know it but the question puzzled me enough to try several codes
and finally ... up to read the manual.
--
Eduardo J. Salom | eduardo@psg.com ..!uunet!m2xenix!eduardo
SoftWare Plus SA | BIX: swp CIS: [73000,74] swp@dci2sp.das.net
Larrea 1218 - 2.A | Delphi: swp VMS-Mail: PSI%07222211100717::SWP
(1117) Buenos Aires, Argentina |
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads