Skip to content

Add method to check if a path in zipfs is a symbolic link#2219

Open
schmelter-sap wants to merge 1 commit intoSAP:sapmachinefrom
schmelter-sap:symlink-from-zipfs
Open

Add method to check if a path in zipfs is a symbolic link#2219
schmelter-sap wants to merge 1 commit intoSAP:sapmachinefrom
schmelter-sap:symlink-from-zipfs

Conversation

@schmelter-sap
Copy link
Copy Markdown
Member

This adds a method to check if a given path from zipfs corresponds to a symbolic link.

fixes #2218

@SapMachine
Copy link
Copy Markdown
Member

Hello @schmelter-sap, this pull request fulfills all formal requirements.

@RealCLanger
Copy link
Copy Markdown
Member

restest this please

@RealCLanger
Copy link
Copy Markdown
Member

Do you really need this SharedSecrets stuff? I think for jdk.nio.zipfs it is fine to add public methods and call them since those are internal implementation classes.

You should only need to export the jdk.nio.zipfs package to jdk.sapext and then you can directly call any method you add.

* @param path The path in the zipfs.
* @return <code>true</code> if the path represents a symbolic link.
*/
public static boolean isSymbolicLink(Object path) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter should rather be java.nio.file.Path instead of just Object, no?


return access.isSymbolicLink(path);
}
} No newline at end of file
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line break is missing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add method to check if a path in zipfs is a symbolic link

3 participants