Detecting if a FilePath is a symlink on Jenkins workers

19 views
Skip to first unread message

Berend D.

unread,
May 8, 2024, 9:55:34 AM5/8/24
to Jenkins Developers
To determine if a FilePath of a remote path is a symlink or not, I figured I should be able to use the isDirectory() of the FilePath instance - however that seems to return true for symlinks to directories as well.

There is also an isSymlink() function, but that one is static and seems to operate on a File and suddenly requires arguments for root and openOptions.

Is there a different function to use on a FilePath instance to check if its pointing to a symlink?

Cheers.
Reply all
Reply to author
Forward
0 new messages