🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sunyab.tutorial
Article #1

turbo pascal 5.0 SetFAttr help....

#1
From: kevin lyda
Date: Thu, 02 Aug 1990 03:43
35 lines
1848 bytes
this program compiles perfectly and runs with the problem described at the
end of the code.

{$A+,B-,D+,E+,F-,I+,L+,N-,O-,R-,S+,V+}
{$M 16384,0,327680}
program test;
 
uses
  dos;
 
var
  log : text;
  f : file;
  attr : word;
 
begin
  assign(f,'c:\language');
  assign(log,'c:\tmp\log');
  rewrite(log);
  setfattr(f,hidden);
  writeln(log,doserror);           {----> 0                         }
  getfattr(f,attr);                     {no dos error from setfattr }
  writeln(log,attr,' ',doserror);  {----> 18 0                      }
  setfattr(f,directory);                {hidden directory, no dos   }
                                        {error from getfattr        }
  writeln(log,doserror);           {-??-> 5                         }
  getfattr(f,attr);                     {dos error `file access     }
                                        {denied' from setfattr      }
  writeln(log,attr,' ',doserror);  {----> 18 0                      }
  close(log);                           {directory is still hidden..}
end.
 
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?
Technical Details
Message-ID: <31924@eerie.acsu.Buffalo.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!rutgers!ub!lyda

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!rutgers!ub!lyda
From: lyda@sybil.cs.Buffalo.EDU (kevin lyda)
Newsgroups: sunyab.tutorial,comp.lang.pascal,comp.os.msdos.programmer
Subject: turbo pascal 5.0 SetFAttr help....
Keywords: SetFAttr,hidden,unhide
Message-ID: <31924@eerie.acsu.Buffalo.EDU>
Date: 2 Aug 90 03:43:27 GMT
Sender: news@acsu.Buffalo.EDU
Followup-To: sunyab.tutorial
Organization: State University of New York at Buffalo/Comp Sci
Lines: 35
Nntp-Posting-Host: sybil.cs.buffalo.edu
Originator: lyda@sybil.cs.Buffalo.EDU