Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4042001

java.io.File: Add support for symbolic links

    Details

    • Subcomponent:
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5.1, solaris_2.6

      Description

      This is a request to add the ability to detect/create/delete symbolic links in the java.io.File class.

      For example, one of our licensees would like to do:

      How does one create symbolic link in java? Also how does one detect if a
      directory name is a symbolic link and get the link destination?

      I went through java.io.File class which does not seem to have any methods for
      these purposes.

      In our installation program we have to do something like the following through a
      java program.

      Assume that /var/opt/Xerox/MSS01 is a link to /opt/Xerox/MSS0101.

      Check to see if /var/opt/Xerox/MSS01 is a symbolic link
      If it is get the directory name it points to
      Remove /var/opt/Xerox/MSS01
      Create /var/opt/Xerox/MSS01 as a link to another directory
      /opt/Xerox/MSS0102

      ===============================================
      Another report from ###@###.###:

      It would be nice if Java had a concept of symbolic
      link (java.io.symlink?). I believe symbolic links
      are common to most major OS (aliases in Windows/Mac)
      and this could be a no-op on other platforms.

      It should probably be a subclass of java.io.File
      and have methods to find what it is linked to.

      brian.klock@eng 1997-11-20
      ==================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mr Mark Reinhold
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: