code: protected String getPathName(VirtualFile file) {
          try {
              // prefer the URI, as the pathName might
              // return an empty string for temp virtual files
              return file.toURI().toString();
          } catch (Exception e) {
              return file.getPathName();
          }
      }
docs: Get the path name for the VirtualFile.
  
  @param file the virtual file
  @return the path name