Convert Java code to Coldfusion, how to work with abstract objects?

73 Views Asked by At

Took some working code from a Java 8 project, and trying to run it in CF 2018.

String fileName = "C:\test.txt";
File file = new File(fileName);

BasicFileAttributeView attributes = Files.getFileAttributeView(file.toPath(),BasicFileAttributeView.class);

With CF, so far I have only this working:

<cfset variables.file = "c:\test.txt">
<cfset filePath = createObject("java","java.io.File").init(variables.file)>

How can I create an object for BasicFileAttributeView? It's abstract.

0

There are 0 best solutions below