' Returns the filename from a fullpath
Sub getFileName(path As String) As String
' Define the JavaObject
Dim fileO As JavaObject
' Get the fileio class
fileO.InitializeNewInstance("java.io.File", Array As Object(path))
' Getthe filename
Return fileO.RunMethod("getName", Null)
End Sub
' Returns the filepath from a fullpath
Sub getFilePath(path As String) As String
' Define the JavaObject
Dim fileO As JavaObject
' Get the fileio class
fileO.InitializeNewInstance("java.io.File", Array As Object(path))
' Getthe filename and path
Dim n As String = fileO.RunMethod("getName", Null)
Dim p As String = fileO.RunMethod("getPath", Null)
p = p.Replace(n, "")
Return p
End Sub