public File getPhysicalFile ( ) throws IOException { final SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { sm . checkPermission ( new VirtualFilePermission ( getPathName ( ) , "getfile" ) ) ; } final VFS . Mount mount = VFS . getMount ( this ) ; if ( sm != null ) { return doIoPrivileged ( ( ) -> mount . getFileSystem ( ) . getFile ( mount . getMountPoint ( ) , this ) ) ; } return mount . getFileSystem ( ) . getFile ( mount . getMountPoint ( ) , this ) ; }
Get a physical file for this virtual file . Depending on the underlying file system type this may simply return an already - existing file ; it may create a copy of a file ; or it may reuse a preexisting copy of the file . Furthermore the returned file may or may not have any relationship to other files from the same or any other virtual directory .