Nice that you have upgrade your KNIME AP version
Don’t hesitate to give us any feedback about the new 4.6 version here and about the new KNIME modern UI Preview
That being said, regarding your last comment I guess the node is expecting an string variable, could you try to append getPathString() before your code and change the variable type to string? See the below screenshot
Lmk if it works!