Package net.sourceforge.jnlp.util
Class RestrictedFileUtils
java.lang.Object
net.sourceforge.jnlp.util.RestrictedFileUtils
This class contains a method to create restricted files.
- Author:
- Omair Majid
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateRestrictedDirectory(File directory) Creates a new directory with minimum permissions.static voidcreateRestrictedFile(File file) Creates a new file with minimum permissions.static StringgetSIDForPrincipal(Principal principal) static booleanprincipalInWinSIDS(Principal principal)
-
Constructor Details
-
RestrictedFileUtils
public RestrictedFileUtils()
-
-
Method Details
-
createRestrictedDirectory
Creates a new directory with minimum permissions. The directory is not readable or writable by anyone other than the owner. The parent directories are not created; they must exist before this is called.- Parameters:
directory- directory to be created- Throws:
IOException- if IO fails
-
createRestrictedFile
Creates a new file with minimum permissions. The file is not readable or writable by anyone other than the owner. If writeableByOwner is false, even the owner can not write to it.- Parameters:
file- path to file- Throws:
IOException- if IO fails
-
principalInWinSIDS
-
getSIDForPrincipal
-