🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #441

Re: How to hide a folder?

#441
From: Peter Jones
Date: Thu, 20 Oct 2005 18:04
22 lines
1574 bytes
Jon Shemitz <jon@midnightbeach.com> wrote:
>> I know I can hide a file by writing: File.SetAttributes("C:\\Test.txt",FileAttributes.Hidden)
>> But how can I hide a folder directly?
>
>what do you mean by "directly"? Do you want to create a FileInfo
>object for your directory, and then call an instance method?
>

Jon, thanks for your response.

My original question was how to hide a directory. Since I can 
use File.SetAttributes to hide a file, I thought I could try 
Directory.SetAttributes too. But there is no such method, and 
I have no clue.

Fortunately, your response about the FileInfo Object hinted me 
that there should analogously exist a DirectoryInfo class, 
which I didn't know before. Now my question is solved.

Thanks,
Peter
Technical Details
Message-ID: <4357dc42$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4357afa6$1@newsgroups.borland.com> <4357CFDF.77C96025@midnightbeach.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,f976d83056a0e2d9
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Jones" <peter@hotmail.com>
Sender: "Peter Jones" <peter@hotmail.com>
Reply-To: "Peter Jones" <peter@hotmail.com>
Subject: Re: How to hide a folder?
Newsgroups: borland.public.csharpbuilder.language.csharp
X-User-Info: 65.94.111.25     
References: <4357afa6$1@newsgroups.borland.com> <4357CFDF.77C96025@midnightbeach.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <4357dc42$1@newsgroups.borland.com>
Date: 20 Oct 2005 11:04:50 -0700
X-Trace: newsgroups.borland.com 1129831490 207.105.83.66 (20 Oct 2005 11:04:50 -0700)
Lines: 22
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail