United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6838333 New I/O: Update file system API to jsr203/nio2-b101
JDK-6838333 : New I/O: Update file system API to jsr203/nio2-b101

Details
Type:
Enhancement
Submit Date:
2009-05-07
Status:
Resolved
Updated Date:
2010-04-02
Project Name:
JDK
Resolved Date:
2009-07-17
Component:
core-libs
OS:
generic
Sub-Component:
java.nio
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
This bug tracks updates to the JSR-203 spec that have accumulated since the integration into jdk7 b50.

- The FileRef interface has gone astray from its original goals and should be corrected. It should be a simple interface that allows the file to be opened for reading or writing, and provide access to associated metadata. It can be implemented by Path and java.net.URL.

- The conditions for when Path#toAbsolutePath throws a security exception are not clear and should be clarified.

- Path defines both delete() and delete(boolean). The latter method would be cleaner if replaced by a deleteIfNotexists method.

- Path#newDirectoryStream(String) declares a bogus UOE.

- Path#copyTo should make it clear that last-modified-time is only copied if supported by file system.

- Paths.get(URI) and FileSystemProvider should make it clear that the FileSystem can be created on-demand

- BasicFileAttributes#linkCount should be removed.

- PosixFilePermissions#toString should make it clear that the returned String is parsable by fromString.

- lookupPrincipalByGroupName returns a GroupPrincipal (spec currently states a user principal).

- API doesn't have the equivalent of File#mkdirs. This is trivially added as Files#createDirectories.

- DirectoryStreamFilters is not as useful as originally thought; it can be removed.

- FileAction/Files#withDirectory is not as useful as originally thought; it can be removed.

- SecureDirectoryStream#newDirectoryStream has a boolean to indicate if links should be followed. This should be changed to LinkOption... and the filter removed.

                                    

Comments
EVALUATION

See description.
                                     
2009-05-07



Hardware and Software, Engineered to Work Together