Class UpgradeSymlink
java.lang.Object
com.aoindustries.aoserv.daemon.util.UpgradeSymlink
Manages symbolic links for Tomcat installations.
- Author:
- AO Industries, Inc.
-
Constructor Summary
ConstructorDescriptionUpgradeSymlink
(String linkPath, String oldLinkTarget, String newLinkTarget) UpgradeSymlink
(String oldLinkPath, String oldLinkTarget, String newLinkPath, String newLinkTarget) -
Method Summary
Modifier and TypeMethodDescriptionGets the relative path to the new symlink ornull
if should not exist.Gets the new link target ornull
if should not exist.Gets the relative path to the old symlink.Gets the old target.boolean
upgradeLinkTarget
(PosixFile baseDirectory, int uid, int gid) Updates the symlink if needed.
-
Constructor Details
-
Method Details
-
getOldLinkPath
Gets the relative path to the old symlink. -
getOldLinkTarget
Gets the old target. -
getNewLinkPath
Gets the relative path to the new symlink ornull
if should not exist. -
getNewLinkTarget
Gets the new link target ornull
if should not exist. -
upgradeLinkTarget
Updates the symlink if needed. Will also reset the UID and GID if they mismatch.- Returns:
true
if link modified. UID and GID changes alone will not count as a change.- Throws:
IOException
-