public default Path asPath (FileObject file)

Returns the path, if any, underlying this file object (optional operation). File objects derived from a FileSystem, including the default file system, typically have a corresponding underlying Path object. In such cases, this method may be used to access that object.

Parameters:
file    a file object

Returns:  a path representing the same underlying file system artifact

Exceptions:
IllegalArgumentException    if the file object does not have an underlying path
UnsupportedOperationException    if the operation is not supported by this file manager

Since:  9

@implSpec The default implementation throws UnsupportedOperationException for all files.