From c7cf3cbbfbdc27c1f8404bd772d780aada48fffb Mon Sep 17 00:00:00 2001 From: Will Hedgecock Date: Fri, 29 Oct 2021 16:30:37 -0500 Subject: [PATCH] New method to return full system path of the serial port --- src/main/java/com/fazecast/jSerialComm/SerialPort.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/fazecast/jSerialComm/SerialPort.java b/src/main/java/com/fazecast/jSerialComm/SerialPort.java index 557a6a8..df3d594 100644 --- a/src/main/java/com/fazecast/jSerialComm/SerialPort.java +++ b/src/main/java/com/fazecast/jSerialComm/SerialPort.java @@ -1260,6 +1260,13 @@ public final class SerialPort */ public final String getSystemPortName() { return (isWindows ? comPort.substring(comPort.lastIndexOf('\\')+1) : comPort.substring(comPort.lastIndexOf('/')+1)); } + /** + * Gets the operating system-defined device path corresponding to this serial port. + * + * @return The system-defined device path of this serial port. + */ + public final String getSystemPortPath() { return comPort; } + /** * Gets a description of the port as reported by the device itself. *