### Get Long Filename

To get the Long Filename for a file, several options possible.
Use FileChooser from the jFX library
' Select a file. The filename is returned as long filename
Dim fs As FileChooser
fs.Initialize
Dim strFilename = fs.ShowOpen(MainForm) As String
Log(strFilename)
Use API method from the java.io.File class
Read more here:
http://docs.oracle.com/javase/7/docs/api/java/io/File.html
Hint to open a file with a Long Filename
Dim strFile As String = File.DirApp & "\a.txt"
strFile = GetCanonicalPath(strFile)
fx.ShowExternalDocument(strFile)
' Get the canonical path from the abstract path
' Parameter Path
' Returns the Long Pathname
' Example:
' Log("Filepath:" & GetCanonicalPath(File.DirApp))
`Sub GetCanonicalPath(Path As String) As String
Dim fileO As JavaObject
fileO.InitializeNewInstance("java.io.File", Array As Object(Path))
Return fileO.RunMethod("getCanonicalPath", Null)
End Sub`

Changed: , Category: Files, File: T6C193M1379.htm, ID: 1379