Code example for FilePermission

Methods: getName

0
 
			robotProxy.punishSecurityViolation(message);
			return false; 
		} 
		// If this is a writable file, permit access 
		if (fileSystemManager.isWritable(filePermission.getName())) {
			return true; 
		} // else it's not writable, deny access. 
 
		// We are deleting our data directory. 
		if (fileSystemManager.getWritableDirectory().toString().equals(filePermission.getName())) {
			return true; 
		} 
		// Not a writable directory. 
		final String message = "Preventing " + robotProxy.getStatics().getName() + " from access: " + filePermission
				+ ". You may only delete files in your own data directory: " + fileSystemManager.getWritableDirectory();
 
		robotProxy.punishSecurityViolation(message);
		return false; 
	} 
Connect your IDE to all the code out there  Get Codota for Java