http HideOutputFile property
Return to Introduction  Previous page  Next page
Applies to
auHTTP component.  

Declaration
property HideOutputFile: Boolean;  

Description
The HideOutputFile property determines whether the file (specified in OutputFileName property), which created to store the data of downloaded document, should be hidden in file system (should have "hidden" and "temporary" file attributes set).  
 
Use the HideOutputFile property together with OutputFileName, if you don't want to use memory streams for downloaded files, and don't want to show downloaded files in the file system.  
 
tip Anyway, you will be able to rename the downloaded file and change its file attributes (using SetFileAttributes WinAPI), in the OnDone event handler.  

Example
auHTTP1.URL := 'http://www.domain.com/filename.zip';  
auHTTP1.OutputFileName := 'c:\filename.zip';  
auHTTP1.HideOutputFile := True;  
auHTTP.Read;  
 
// and when file will be successfully downloaded you can  
// change the file attributes to Normal in the OnDone event handler  
procedure TForm1.auHTTP1Done(Sender: TObject; const ContentType: string;  
  FileSize: Integer; Stream: TStream);  
begin  
  // set file attributes to normal  
  Windows.SetFileAttributes(PChar(FileSize), FILE_ATTRIBUTE_NORMAL);  
end;  
 

See also
OutputFileName property;  
OnDone event and Read method.  
File not found.