[futurebasic] Re: [FB] Invisible file

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: "Pixmix (micronet)" <pixmix@...>
Date: Tue, 14 Sep 1999 19:26:45 +0200
WinGammon@... wrote:

> How do I make a file invisible when it is created?
>
> David
>

David,

You can use this FN. I think  I have adapted it from one of Rick's gifts.

CLEAR LOCAL MODE
DIM pbBlk.80
DIM osErr%
LOCAL FN VisibleFile(visible,filename$, vRefNum%)
  pbBlk.ioNamePtr& = @filename$
  pbBlk.ioVRefNum% = vRefNum%
  osErr% = FN GETFILEINFO (@pbBlk)
  LONG IF visible
    pbBlk.ioFinderInfo.fdFlags% = pbBlk.ioFinderInfo.fdFlags% XOR _fInvisible
  XELSE
    pbBlk.ioFinderInfo.fdFlags% = pbBlk.ioFinderInfo.fdFlags% OR _fInvisible
  END IF
  osErr% = FN SETFILEINFO (@pbBlk)
END FN = osErr%

Call it like this err = FN VisibleFile(_false,yourFilename$,vRef)
Cheers

Alain