getPathForFile

abstract fun getPathForFile(file: File): String(source)

The file system path that this File object points to. In the case where the object passed in is not a File object an exception is thrown. In the case where the File object passed in was constructed in JS and is not backed by a file on disk an empty string is returned.

This method superceded the previous augmentation to the File object with the path property. An example is included below.