JDK-4267530 : File.setHidden() to create a hidden file
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 1.2.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-09-01
  • Updated: 2009-02-16
  • Resolved: 2009-02-16
Related Reports
Duplicate :  
Description
Name: krT82822			Date: 08/31/99


There is no way to create a hidden file on windows platforms.

I suggest a setHidden(java.io.File) method which sets the hidden
bit in the windows file attribute, or prefixes the file name 
with a period under UNIX. I dont know the methods used on other platforms.

(see also bug # 4131223 --eval1127@eng, 8/31/99)
(Review ID: 94650) 
======================================================================

Comments
EVALUATION There are no plans to provide a method exactly as requested but the new file system API defined by JSR-203 does allow the DOS hidden attribute to be set.
16-02-2009

EVALUATION A new JSR to cover upcoming filesystem work will be submitted soon. We will add this request to the list of issues to be considered in the new JSR. ###@###.### 2002-03-28
28-03-2002