Charles Bell
Posts: 519
Nickname: charles
Registered: Feb, 2002
|
|
Re: Java IO - Set File Hidden
|
Posted: Mar 5, 2004 9:29 AM
|
|
When you read the documentation on the method isHidden you find that the way a file is determined to be hidden is by the filename. So its a matter of naming your file when you create it. Unix hidden files just start with the period character. In Winodws you have to find a file extension that is hidden and just use that when you name it.
I set my file view option to show hidden files. So everything shows up.
A old hacker dos trick was to use a space character ascii code 20. But that is easily seen and read as well in windows.
The simplest thing is don't give it a file extension at all.
public boolean isHidden() Tests whether the file named by this abstract pathname is a hidden file. The exact definition of hidden is system-dependent. On UNIX systems, a file is considered to be hidden if its name begins with a period character ('.'). On Microsoft Windows systems, a file is considered to be hidden if it has been marked as such in the filesystem.
|
|