JDK-6350340 : File should support creating and detecting links
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2005-11-15
  • Updated: 2010-04-02
  • Resolved: 2009-02-16
Related Reports
Duplicate :  
Relates :  
Description
A DESCRIPTION OF THE REQUEST :
There should be possible to create links like by Linux/Unix/Windows ln command. It should also be possible to detect is some file link and where does it link or does it link nowhere.

JUSTIFICATION :
Handling links is common property, when working with files.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Following kind of methods could be used:

File f = ...; // Actual file or directory
File linkName = ...; // Link

f.link(linkName);

if (linkName.isLink()) {
    // is a link
    if (linkName.isEmptyLink()) {
        // does not link anywhere
    }
}

Comments
EVALUATION Full support for symbolic links has been added by JSR-203.
15-11-2005